Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

From "Head First EJB" - pg. 57

 
Bryan Noll
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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.
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic