This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes From Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "From "Head First EJB" - pg. 57" Watch "From "Head First EJB" - pg. 57" New topic
Author

From "Head First EJB" - pg. 57

Bryan Noll
Greenhorn

Joined: Feb 06, 2004
Posts: 26
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
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
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

Joined: Feb 06, 2004
Posts: 26
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: From "Head First EJB" - pg. 57