Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

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

 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot for the information.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic