• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot for the information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic