• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

From "Head First EJB" - pg. 57

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't go through the same pain I went through figuring out the command-line nuances here.


What the book says the command should be...
javac -classpath {$CLASSPATH}:AdviceAppClient.jar AdviceClient.java

What works from cygwin...
javac -classpath "$CLASSPATH;AdviceAppClient.jar" AdviceClient.java

What works from dos...
javac -classpath "%CLASSPATH%;AdviceAppClient.jar" AdviceClient.java


It took me a couple painstaking hours to figure this out...not a big deal....but in case you have to do it. Appending to the system classpath for only that compile. Assumption is that the .java file you're compiling needs access to some classes that don't exist in the system classpath, but those classes are not permanent enough for you to want to add to the system classpath.
 
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
Thanks Bryan! We really meant to have something in the intro to the book that discussed the subtle (and not subtle) differences in command-line syntax, etc. But we didn't... I *wimped out* and just said, "Here's the way it works in one shell... you'll need to adjust it for the syntax of your own shell..."

And we didn't do the best job at explaining why we're doing it. We'll try to improve that in the next version, or maybe put something on our website.

Anyway, thanks again for taking the time to post this so that others won't have to struggle.

cheers,
Kathy
 
Bryan Noll
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No problem...you and Bert do enough good work in those books that you shouldn't have to worry about stuff like that. Little dinky problems like that provide the anally stubborn portion of me satisfaction when I'm able to make it go.
 
And then the flying monkeys attacked. My only defense was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic