This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Using -classpath in different shells (for the AdviceApp client) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Using -classpath in different shells (for the AdviceApp client)" Watch "Using -classpath in different shells (for the AdviceApp client)" New topic
Author

Using -classpath in different shells (for the AdviceApp client)

Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
OK, not just for the client, for everything!
In our client application in the book, we are using a csh unix shell (actually tsch, a variant under OSX), which has a particular syntax for environment variables that is not the same for other shells. Some folks are having trouble mapping that syntax to what their own system uses, so I thought we should compile a list here.
1) csh / tcsh:
java -cp {$CLASSPATH}:AdviceAppClient.jar AdviceClient
// note the curly braces, "$" sign, and ":" colon separators

2) On Windows (From Mikalai Zaikin)
java -cp %CLASSPATH%;AdviceAppClient.jar AdviceClient
// note the "%" sign around CLASSPATH, and ";" semicolon separator

3) On Red Hat Linux 9.0 default shell (from Unnsse Kahn)
javac -classpath $CLASSPATH:AdviceAppClient.jar AdviceClient.java
// note that that there are NO curly braces, just the $ sign and the ":" colon separator

So, if you have a shell that uses different syntax, PLEASE post it here and we'll make this part of a reference document.
Cheers and thanks!
-Kathy
Brian Smith
Ranch Hand

Joined: Oct 26, 2002
Posts: 232
thanks a lot for the information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using -classpath in different shells (for the AdviceApp client)
 
Similar Threads
Found solution to AdviceClient...Ha Ha
Head First AdviceBean is trying to drive me mad
ClassCastException in client
help on a ejb client problem
NoInitialContextException