How to use the Worklist API from Java (classpath ??)
Hi all,
Sorry for a novice question but I couldn't find the way to go about this (probably because it's such common knowldge...)
I would like to try and use the Worklist API from my Java code in Eclipse, and according to the BPEL dev-guide I need to add an Import command for oracle.tip.pc.api.worklist. Where do I find these classes ?????
I guess I need to change my CLASSPATH but I couldn't find a single word about this in the BPEL dev-guide (chapter 17), BPEL installation guide or elseware.
thanks.
Hi all,
Ok now.
To summarize - I was trying the code from BPEL developer guide, chapter 17, page 40 for using the Worklist local API's.
Only after adding the following JAR's to the build path, was I able to compile it:
orabpel-common.jar
orabpel.jar
bpm-infra.jar
bpm-services.jar
So, these 4 JAR's are required for using the Worklist local API's (not a clue in the dev guide itself for this requirement though...)
Thank you very much for your help,
assaf.
Similar Messages
-
How to filter tasks on the Creation date using the IWorklist API in Java
Hi all,
I'm currently developing a java gui application to display usertasks set by the BPM.
I use the WorkList API to communicate with the TaskActionActionHandler.
I only want the tasks that has a creation that is after a specified date. Therefore I add a filter. The code for retrieving the usertasks now becomes:
Map filterMap = new HashMap();
SimpleDateFormat d = new SimpleDateFormat("dd-mm-yyyy");
Date date = d.parse((String) dForm.get("filterdate"));
Calendar cal = Calendar.getInstance();
cal.setTime(date);
filterMap.put(IWorklistService.FILTER_TYPE_CREATE_DATE_FROM_FILTER,
cal);
RemoteWorklistServiceClient client = new RemoteWorklistServiceClient();
client.init();
IWorklistContext ctx = client.authenticateUser(user, password);
List tasks = client.getWorklistTasks(ctx, filterMap,
IWorklistService.SORT_FIELD_TASK_TITLE,
IWorklistService.SORT_ORDER_ASCENDING);
You can see from the above code-fragment that I specify a FILTER_TYPE_CREATE_DATE_FROM_FILTER filter that is given a Calendar object. This is not working properly. Also a Date value gives a runtime error.
The error I get is :
ORABPEL-10150 Worklist Service Task List Error. An error occured in the Worklist Service while retrieving the task list for user jcooper. Check the task filter criterion and the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1602) at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1553) at
Can anyone tell me what kind of dateformat I have to specify for the filter option FILTER_TYPE_CREATE_DATE_FROM_FILTER?
Thanks in advance!
TomHi,
Enter the format that you have defined in the configuration of the property in the Additional Metadata parameter. Use the syntax customFormat=<pattern>.
In this link, you have at the end screenshots where to navigate in KM to see the property metadatas of your property:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/645d4357-0701-0010-07bd-a2ea8c4d0aaf
Here see the Defenitions of the KM Metadata Properties:
https://wiki.sdn.sap.com/wiki/display/KMC/DefenitionsoftheKMMetadata+Properties
Regards,
Praveen Gudapati -
How to use the TCP/IP in Java?Thanks!
How to use the TCP/IP in Java?Thanks!
Look at the java.net package, more specifically to classes ServerSocket (The server TPC conection) and Socket (the client TCP conection)
Abraham -
How to use the pps function from JCOP?
Hi
I'm trying to use the pps function from JCTerminal (JCOP API: [url http://www.cs.ru.nl/~woj/jcopapi/com/ibm/jc/JCTerminal.html#pps(int, int)]pps function ) to connect my client to a virtual card with a specific protocol (T=0).
But I always got the error: "Protocol and parameter selection not supported by this terminal!"
I've tried to make an ATR that support both protocol : [url http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc]3B 90 95 80 81 1F C7 DC.
I really don't know what value to put in the second parameter (baud rate), I've tried with 150000, which is in the range of the ATR but I'm not sure this is correct. And I could't find any example of it.
I'm also not sure where to put the pps command, the specification say directly after a reset, so I tried this implementation:
System.out.print("Start");
readers = TerminalFactory.getDefault().terminals().list(State.CARD_PRESENT);
//If no readers has a card it ends the process
if(readers.isEmpty()){
System.out.println("\nNo card in the reader...");
return;
System.out.println("\nReader Type: "+readers.get(0).toString());
term = (PCSCJCTerminal)JCTerminal.getInstance("PCSC", readers.get(0).toString().substring(15));
term.open();
System.out.println("\nTerminal opened");
//Getting the ATR
atr = new ATR(term.waitForCard(2000));
try {
term.pps(JCTerminal.PROTOCOL_T0, (int)150000);
} catch (Exception e) {
e.printStackTrace();
System.out.println("ATR: "+toHex(atr.getBytes()));
//sending a data 11223344
System.out.println("\nsending data: 11223344");
byte[] responsesend = term.send(0,cmdsend,0,cmdsend.length);
System.out.println("Response data is:" + toHex(responsesend));
//close terminal
term.close();
System.out.println("\nTerminal closed");I've got this output on the console:
<font size="2">StartReader Type: PC/SC terminal Virtual CAD Reader 0
Terminal opened
ATR: 3b 90 95 90 00 81 1f c7 cc
sending data: 11223344
<font color="red">Protocol and parameter selection not supported by this terminal!</font>
at com.ibm.jc.JCTerminal.pps(Unknown Source)
at com.test.essai.main(essai.java:46)
</font>>
And If I take a look at the data exchanged with the card:
<font size="2">Running in Virtual Card mode...
ATR: 3B909580811FC7DC
Waiting for event (power: off, protocol: unknown/undefined)...
Waiting for event (power: off, protocol: unknown/undefined)...
Raw event data: 01
Event: VCAD_EC_POWER_ON (0x01)
Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_POWER_ON) ATR: 3b909580811fc7dc
Raw reply data: 003b909580811fc7dc
Sending reply...
Waiting for event (power: on, protocol: unknown/undefined)...
Waiting for event (power: on, protocol: unknown/undefined)...
Raw event data: 06ff11957b
Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: ff11957b
Accepting any PPS request parameters: Protocol: t=1; FI=9, DI=5
Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: ff11957b
Raw reply data: 00ff11957b
Sending reply...
</font>>
This (above) is the PPS command but not from the PPS function, it is always sent with protocol T=1
<font size="2">Waiting for event (power: on, protocol: t=1)...
Raw event data: 0501
Event: VCAD_EC_SET_PROTOCOL (0x05) Protocol: t=1
Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_SET_PROTOCOL)
Raw reply data: 00
Sending reply...
Waiting for event (power: on, protocol: t=1)...
Raw event data: 0600c10120e0
Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 00c10120e0
Handling protocol-specific command...
Protocol block:
NAD: 0x00
PCB: 0xc1 (T1_S_BLOCK); S-Block type: T1_SBT_IFS_REQ
LEN: 1
INF:
IFS: 20
EDC: 0xe0
Changing IFS(other) from 32 to 32
Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 00e10120c0
Raw reply data: 0000e10120c0
Sending reply...
Waiting for event (power: on, protocol: t=1)...
Raw event data: 0600001300a404000d54657374436c69656e7441707000f0
Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 00001300a404000d54657374436c69656e74
41707000f0
Processing app. command...
App. block:
NAD: 0x00
PCB: 0x00 (T1_I_BLOCK); Seq. #: 0; More data: 0
LEN: 13
INF:
00a404000d54657374436c69656e7441707000
EDC: 0xf0
cmd name: N/A (class #4)
cmd: 00a40400 0d 54657374436c69656e74417070 70
Responding with the reversed command data, SW is hardcoded to 90<INS>
rsp: 707041746e65696c4374736554 90a4
Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 00000f70704
1746e65696c437473655490a475
Raw reply data: 0000000f707041746e65696c437473655490a475
Sending reply...
Waiting for event (power: on, protocol: t=1)...
Raw event data: 060040041122334400
Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 0040041122334400
Processing app. command...
App. block:
NAD: 0x00
PCB: 0x40 (T1_I_BLOCK); Seq. #: 1; More data: 0
LEN: 4
INF:
11223344
EDC: 0x00
cmd name: N/A (class #1)
cmd: 11223344
Responding with the reversed command data, SW is hardcoded to 90<INS>
rsp: 9022
Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 0040029022f
0
Raw reply data: 000040029022f0
Sending reply...
Waiting for event (power: on, protocol: t=1)...
Raw event data: 03
Event: VCAD_EC_POWER_OFF (0x03)
Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_POWER_OFF)
Raw reply data: 00
Sending reply...
Waiting for event (power: off, protocol: unknown/undefined)...
</font>>
If someone know how to use this function or have any advice to help me to select a specific protocol with Jcop API, please let me know.
If you you need any more information don't hesitate to ask.
Best regards
Edited by: Cyril on Sep 22, 2011 9:54 AM-1
I'm using a virtual terminal (windows driver), and I don't see how I could turn off the Auto-pps. I've also tried with a real reader and a card and I have the same error.
-2
I've tried value in the range of the atr (based on this analysis: [url http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc]http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc ). But I don't know if only I value of baud-rate is possible in the range. Anyway I just would like to change the protocol, not the baud-rate.
-3
I've already tried to call pps function before, after the first reset, or with another reset later and I always got the same thing.
term = (PCSCJCTerminal)JCTerminal.getInstance("PCSC", readers.get(0).toString().substring(15));
term.open();
System.out.println("\nTerminal opened");
//Getting the ATR
atr = new ATR(term.waitForCard(2000));
System.out.println("ATR: "+toHex(atr.getBytes()));
jcard = new JCard(term,atr,0);
jcard.reset();
try {
term.pps(JCTerminal.PROTOCOL_T0, (int)312500);
} catch (Exception e) {
e.printStackTrace();
}The same pps is always send after each reset... -
Using the Desktop API in Java SE 6 (Mustang)
<p>The Java platform continues to evolve, and Java applications can now integrate with the host desktop better than ever before. This new article describes how to integrate your Java application into the desktop using new Java SE 6 features:</p>
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/mustang/desktop_api/peterwkc wrote:
Hello to all,
this is some sort of theoretical question.
I been reading the JMS documentation for a while.
1.I could not understand what this statement means :
>
This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
What a developer is allowed to do is different depending on whether they are writing code to run in a container or not. The container already provides lots of services so some code you would write for outside a container is not needed when you write for a container. There are APIs that you are not allowed for in container code if you want to adhere to the spec.
>
2. What is the difference to use the JMS in java EE web orEJB container and application client ?
Thanks.Read more of that document to find out the differences. Application components in Web/EJBs must not create more than one active session per connection while application clients are allowed to do so. -
How to use the windows API GetCaretPos with FireFox? It works with IE
I want to get caret position from a windows desktop application using the Windows API GetCaretPos. It works in any windows Application and in IE. It worked also in FireFox for some minutes in version 3.6.8 but than it stopped working. Can anyone tell me how to make it work?
== This happened ==
Every time Firefox openedMany site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
Note: ''This will temporarily log you out of all sites you're logged in to.''
To clear cache and cookies do the following:
#Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
#Under "Time range to clear", select "Everything".
#Now, click the arrow next to Details to toggle the Details list active.
#From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
#Now click the ''Clear now'' button.
Did this fix your problems? Please report back to us! -
How to isolate the Sql Statement from Java Code
Hi
I Need to know that can we segregate the Sql Statements and convert them to Stored Procedures so as to isolate the Sql statements from Java Code.
So i have one static web page which uses four select Statements so what i want is to create a stored procedure encapsulating these queries. So that the Java Web Developer will simply call the Stored Procedure instead of using four different SQL Statements.
Suppose the developer has these four Statements
Select ename,empno,sal,job from emp;
select empno,ename,mgr from emp;
select deptno,dname from dept;
select emp.ename,emp.empno,emp.deptno,dept,dname fromemp,dept;
So can i encapsulate these four Sql Statements in one Procedure and the Web developer can call the Store procedure and dont need to write the Sql Statements in his code.
Can Anybody guide me how to write this Stored type of Store procedure.
Thankshttp://www.google.com/search?q=java+windows+registry
Next time, search yourself. It might be beyond your belief, but you're really, really not the first person to wonder about this. -
Using the JMS API in Java EE Applications
Hello to all,
this is some sort of theoretical question.
I been reading the JMS documentation for a while.
1.I could not understand what this statement means :
>
This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
2. What is the difference to use the JMS in java EE web orEJB container and application client ?
Thanks.peterwkc wrote:
Hello to all,
this is some sort of theoretical question.
I been reading the JMS documentation for a while.
1.I could not understand what this statement means :
>
This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
What a developer is allowed to do is different depending on whether they are writing code to run in a container or not. The container already provides lots of services so some code you would write for outside a container is not needed when you write for a container. There are APIs that you are not allowed for in container code if you want to adhere to the spec.
>
2. What is the difference to use the JMS in java EE web orEJB container and application client ?
Thanks.Read more of that document to find out the differences. Application components in Web/EJBs must not create more than one active session per connection while application clients are allowed to do so. -
How to use the UME api in order to search the LDAP?
Hello,
I have an application which connects to the LDAP the portal is connecting to and search users according to a certain search criteria.
Here is the relevant piece of code:
Hashtable env = new Hashtable();
DirContext ctx = new InitialDirContext(env);
SearchControls controls = new SearchControls();
String filter = "firstName=..."
NamingEnumeration results = ctx.search("OU=OUs", filter, controls);
I would like to do this same search using the UME API.
Can someone please show me the equivalent code to it using the UME API?Hi Roy,
you find the Configuration File you are using in your portal via System Administration -> System Configuration -> UM Configuration -> Data Sources
or in sapume.properties where you can find
##xml file that configures the persistence except roles
ume.persistence.data_source_configuration=YOUR_DATASOURCE_CONFIG_FILE.xml
In this xml file, there is the entry
<principal type="user">:
<principal type="user">
<nameSpaces>
<nameSpace name="com.sap.security.core.usermanagement">
<attributes>
<attribute name="firstname" populateInitially="true"/><attribute name="displayname" populateInitially="true"/> <attribute name="lastname" populateInitially="true"/> <attribute name="fax"/> <attribute name="email"/> <attribute name="title"/> <attribute name="department"/> <attribute name="extensionAttribute2"/> <attribute name="mobile"/> <attribute name="telephone"/> <attribute name="streetaddress"/> <attribute name="pobox"/> <attribute name="location"/> <attribute name="telephoneShort"/> </attributes>
</nameSpace>
<nameSpace name="com.sap.security.core.usermanagement.relation">
<attributes>
<attribute name="PRINCIPAL_RELATION_PARENT_ATTRIBUTE"/>
</attributes>
</nameSpace>
</nameSpaces>
</principal>
According to your company LDAP attributes, you will have to extend the above attributes, telephoneShort for example is an attribute within our company.
The UME API does the rest.
All you have to do, is request the right attribute (in my above example it was the last name).
(Sorry for the format, but it is quite cumbersome to format it properly with the available editor )
Kind regards,
Rebecca -
How to use the crypto api with gemalto cyberflex 32k ?
Hello ,
I've done many javacard programs using this method :
_compilation with javacard kit 2.2.1
_convertion into ".cap" with the javacard kit 2.1.2
All this programs work fine with this method : helloworld, read, write in the card, ....
But when i want to use the crypto api, i can't charge the program in the card (just by adding 2 lines for generating keys):
----------> returns 0x80206A80 (6A80: Wrong data / Incorrect values i data.)
I think it's because i use the 2.1.2 version , but if i use the 2.2.1 to convert , it's another error and no program work with this method.....even helloworld doesn't work...
-----------> returns 0x80206985 (6985: Command not allowed - Conditions of use not satisfied.)
I thing i must change my gpshel command , but i have read many forums but can't find the configuration for my card cyberflex 32k, some people had similar problems so they used the kit 2.1.2 combined with 2.2.1 like me, but i think they can't use the crypto api with this.........
Any help will be apreciated,
kind regards
Franck
Edited by: jojo85 on Mar 20, 2009 11:03 AMHello,
Thanks Sonnyyu,
I deleted my gpshell 1.4.2 directory and i installed gpshell 1.4.0 instead like they said , to avoid some bugs
i've tested the exemple CardEdgeII.ijc ,
here's what i got:
mode_201
enable_trace
establish_context
card_connect -readerNumber 1
select -AID a0000000030000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
delete -AID A0000003230101
delete -AID A00000032301
delete -AID A00000000101
delete -AID A000000001mode_201
enable_trace
establish_context
card_connect -readerNumber 1
select -AID a0000000030000
Command --> 00A4040007A0000000030000
Wrapped command --> 00A4040007A0000000030000
Response <-- 6F188407A0000000030000A50D9F6E060011020201009F6501FF9000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
Command --> 8050000008674672AE4B85E01800
Wrapped command --> 8050000008674672AE4B85E01800
Response <-- 000081410002B2C600E4010151982BB4CF843B1431E57DB6418652AE9000
Command --> 848201001073CF9B92B3F11E10BE12D1318E9A8095
Wrapped command --> 848201001073CF9B92B3F11E10BE12D1318E9A8095
Response <-- 9000
delete -AID A0000003230101
Command --> 80E40000094F07A000000323010100
Wrapped command --> 84E40000114F07A000000323010149D51E784E07966B00
Response <-- 6A88
delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
delete -AID A00000032301
Command --> 80E40000084F06A0000003230100
Wrapped command --> 84E40000104F06A00000032301E3788AF4A9E32C2100
Response <-- 6A88
delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
delete -AID A00000000101
Command --> 80E40000084F06A0000000010100
Wrapped command --> 84E40000104F06A00000000101C3CC96E6E54AF0ED00
Response <-- 6A88
delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
delete -AID A000000001
Command --> 80E40000074F05A00000000100
Wrapped command --> 84E400000F4F05A000000001DA73D168B218692C00
Response <-- 6A88
delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
install -file CardEdgeII.ijc -nvDataLimit 12000 -instParam 00 -priv 2
install -file CardEdgeII.ijc -nvDataLimit 12000 -instParam 00 -priv 2
Command --> 80E602001705A00000000107A00000000300000006EF04C60231000000
Wrapped command --> 84E602001F05A00000000107A00000000300000006EF04C60231000019F52839EB52A80200
Response <-- 009000
Command --> 80E80000EFC48230F401000FDECAFFED010204000105A00000000102001F000F001F000A00290256006C2307000A04230000067F00060000000004010004002904000107A0000000620101010107A0000000620102010107A0000000620201000107A000000062000103000A0106A0000000010119CE06006C00800313000C040400051856FFFF1BA41A2A17FB1818183718A61971008300020001011100001E4F1EC51F771F9A1FA71FAC1FB31FBC1FCD1FF41FFD20082043204B205520662071008300030001010D0000209520B520C520D52101211C21742196221F2230226F227D22E1072307000640188C00861803880010
Wrapped command --> 84E80000F7C48230F401000FDECAFFED010204000105A00000000102001F000F001F000A00290256006C2307000A04230000067F00060000000004010004002904000107A0000000620101010107A0000000620102010107A0000000620201000107A000000062000103000A0106A0000000010119CE06006C00800313000C040400051856FFFF1BA41A2A17FB1818183718A61971008300020001011100001E4F1EC51F771F9A1FA71FAC1FB31FBC1FCD1FF41FFD20082043204B205520662071008300030001010D0000209520B520C520D52101211C21742196221F2230226F227D22E1072307000640188C00861803880010C9DE1DD3FD6CD8CE
Response <-- 9000
Command --> 80E80001EF08900B7F001C7B001C03104D387B001C041075387B001C051073387B001C061063387B001C07106C387B001C081065387B001C10061030387B001C1007103038187B001C037B001C925B8C004D6108119CFF8D005318100891008087011810089100808702AD02038F00803D0610108C002037AD020324940000807B001C037B001C925B8B002A7A05361A0525321A062529071F62071F10086C08119C108D00531607610EAD021F24940000802804700CAD011F2494000080280415046708119C108D0053031A07258D002E2905198B003016056A081167008D00531605076D08119C0F8D00531A08252906160504
Wrapped command --> 84E80001F708900B7F001C7B001C03104D387B001C041075387B001C051073387B001C061063387B001C07106C387B001C081065387B001C10061030387B001C1007103038187B001C037B001C925B8C004D6108119CFF8D005318100891008087011810089100808702AD02038F00803D0610108C002037AD020324940000807B001C037B001C925B8B002A7A05361A0525321A062529071F62071F10086C08119C108D00531607610EAD021F24940000802804700CAD011F2494000080280415046708119C108D0053031A07258D002E2905198B003016056A081167008D00531605076D08119C0F8D00531A082529061605045F95980396338536
Response <-- 9000
°
°
°
there are again many lines and the response is always 9000
i'll try to find a converter to convert the .cap files of my crypto application into .ijc files
thanks,
kind regards
Franck
Edited by: jojo85 on Mar 21, 2009 2:48 PM -
How to use the google search from inside a java program
Hi guys
How can i use google search in my java program?
What will be the type of the reply i get back from google?
Thanks in advance
[http://javamilestone.blogspot.com/|http://javamilestone.blogspot.com/]Hi,
You have here some examples about how to make search on google from a Java application.
The type of reply is JSON
Here some documentation about it:
[http://code.google.com/apis/ajaxsearch/documentation/#fonje|http://code.google.com/apis/ajaxsearch/documentation/#fonje]
And here some snippets:
[http://code.google.com/apis/ajaxsearch/documentation/#fonje_snippets|http://code.google.com/apis/ajaxsearch/documentation/#fonje_snippets]
Regards,
David. -
How to use the random generator in java
hey peeps, this is the class in which i am trying to implement the random generator in;
public class Matchlist
private studentdetails sd = new studentdetails();
/** matchList StringBuilder stores the match list in progress */
private StringBuilder matchList = new StringBuilder();
private int loop = 0;
private int matches = 0;
public Matchlist()
sd.createstudentdetails();
/** Method to create the actual match list, returns the list as a string */
public String CreateMatch()
int g;
int y;
for (g = 0; g < 4; g++)//g = game
for (y = 17; y > -1; y--)//y = green house
/** Check to see if the game is empty */
if (sd.getgh(y).getGame(g).equalsIgnoreCase(""))
for (int x = 0; x < 18; x++) //x = yellow house
if (sd.getyh(x).getGame(g).equalsIgnoreCase(""))
if (sd.getgh(y).getC_lass() != sd.getyh(x).getC_lass())
/** Check to see if the person has played the other person */
if (sd.getgh(y).checkPlayed(sd.getyh(x).getName()) == false)
/** Set the game to the name of the opponent played */
sd.getyh(x).changeGame(g, sd.getgh(y).getName());
sd.getgh(y).changeGame(g, sd.getyh(x).getName());
/** Build the match list step by step using append with \n at the end to create a new line */
matchList.append(sd.getyh(x).getName() + " vs " + sd.getgh(y).getName() + "\n");
matches++;
break;
/** Convert the stringbuilder into an actual string, then return it */
String completeMatchList = matchList.toString();
System.out.println(matches);
for (int i = 0; i <18; i++)
sd.getyh(i).getEmptyMatches();
sd.getgh(i).getEmptyMatches();
return completeMatchList;
}what i dont understand is how to implement it to pick my matches at random using the http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html java tutorials from here
regardsHow to use Random ?
First you open API then you read it, then you use it.
You mention you try to use it but i just see a horrible nested for for for if if if loop.
Restructure code and question and maybe it makes more sense.
Edited by: pgeuens on 10-mrt-2008 22:58 -
How to run the perl script from java ?
Hi , I need to run the pearl script from the server and to get the result of the script thro' java using SSH
Is there any 3rd party SSH API in java ?
Please help me out
thanks in advance
karthikThis seems like a very strange thing to want to do.
What is the perl script doing?
Do other programs (not some shell script) access this server-side perl script from a different machine?
If so how do they do it?
What currently triggers the perl script to execute?
What currently handles the output from the perl script?
If you can answer these questions (and understand the answers) you should be able to come up with a different approach to this.
You do not really want to call a remote perl script from a Java program, you want to achieve the effect you think that would have if you could do it.
So find the answers to the above questions, write them on 3" x 5" cards and lay them out on your desk.
What flow of control needs to happen? Which piece of code needs to produce or consume which piece of data?
If that fails, ask you self or who ever is making you do this what are the use-cases?
If you do not know what use-cases are or do not understand them well enough try reading
Use Case Modeling (The Addison-Wesley Object Technology Series) by Kurt Bittner and Ian Spence (Paperback - Aug 30, 2002)
http://www.amazon.com/s/ref=nb_ss_gw/002-7908514-4043267?url=search-alias%3Dstripbooks&field-keywords=use+cases&x=0&y=0
It is a short and easy to read book on the subject and also one of the best.
You MUST understand WHAT you are trying to achieve before you can decide HOW you are going to achieve it. -
How to use the RequestService API to create request in OIM 11g
Hi Guys,
We are trying to build a custom ADF app (Request Forms) to allow users to request access to resources. We want to use the OIM RequestService APIs (oracle.iam.request.api.RequestService).
We can't seem to find a proper guide to use this service.
Is there anyone who has done this or know how we can achieve this in OIM 11g?
Thanks in advance
TavTry here
http://java.net/projects/openptk/sources/svn/show/branches/Oracle/OIM11g/examples/java?rev=1313
Fred -
How to use the COMM API in a JAR file
I have developed an application, using the NetBeans IDE, to communicate with a modem over the COM1 serial port using the Java Comm API. The application works fine within the IDE, but when a JAR file is created and "double-clicked", the application launches correctly, but when the code is executed to "talk" over the COM1 serial port - nothing happens. No exceptions and no warnings are thrown. My environment is XP, SP1.
The manifest file is as follows:
Manifest-Version: 1.0
Class-Path: ../j2sdk1.4.2/jre/lib/ext/TimerBean.jar ../j2sdk1.4.2/jre/
lib/ext/AbsoluteLayout.jar ../j2sdk1.4.2/jre/lib/ext/comm.jar
Created-By: NetBeans IDE
Specified-By: Projects/TheApp/Files/TheApp.jarContent
Main-Class: Main
According to the Comm API installation instructions, the following files are copied:
copy comm.jar \j2sdk1.4.2\jre\lib\ext
copy wind32com.dll \j2sdk1.4.2\bin
copy javax.comm.properties \j2sdk1.4.2\jre\lib
I suspect it has something to do with the paths.
Any help would be greatly appreciated. Thanks.Thanks for your input, but after trying what you suggested the problem still exists. I think your right to be suspicous of the javax.comm.properties file. The application, that worked in the IDE, exhibits the same behavoir as the JAR file if the javax.comm.properties file is removed from the ../jre/lib directory. In other words it compiles correctly in the IDE, but when executed, nothing happens when the code that "talks" to the serial port is run.
I've tried moving the javax.comm.properties file into the working directory. Also, the CLASSPATH and PATH system variables were modified to include the path to javax.comm.properties.
If you have anymore ideas, please let me know.
Thanks.
Maybe you are looking for
-
What are the correct parameter names for a JDBC pool connection?
Looking in the admin console I notice the differences in the properties name (type casting) of PointBasePool and __TimerPool pool connections properties and the create wizard properties. PointBasePool and __TimerPool uses this name parameters: User,P
-
my apple store isn't working after I updated to ios 8.1.3, its just a blank screen and it won't load after doing everything I can to make it work again. I even restarted the phone and I just don't know what to do at this moment.
-
Can't see windows shared printer
Hi, Just joined a small company that is all windows based. So if I want to keep using my Mac, I need to resolve a couple important issues. One of them is printing to the office printers. The office is set up to use a PC running windows 2000 connected
-
Participant 'weblogic' does not have permissions to execute the operation ?
Hello, We have modelize our Business process, this process can start with An Automtaic task based on an event recevied from a web services or via a start event with an iniator task. The deployment of this process was ok. But when we try to run this p
-
Enhancment MM06E005 : Screen Size
Hi, I am using Enhancement MM06E005 for Custom fields in Contract (Outline agreement) . I have created the field in Sub Screen : SAPLXM06 0201. In the contract the Size of the Screen displaying as only 3 Lines. I have almost 50 Fields in the scre