• 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
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

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.
 
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic