I had some problems getting this to compile and run also. However, I did get it to compile and run under Windows. Here are my environment settings and command line statements. I hope you find this helpful.
Java installation: j2sdk_nb (NetBeans
IDE)
Environment variables:
JAVA_HOME = C:\j2sdk_nb\j2sdk1.4.2
J2EE_HOME = C:\j2sdkee1.3.1
CLASSPATH = %JAVA_HOME%\bin;%J2EE_HOME\bin%;.
Change the getAdvice method in the AdviceBean and Advice interface to be getMessage instead. Pages 18 and 19.
Bean and Interface compile line Page 30:
javac -classpath %CLASSPATH%;%J2EE_HOME%\LIB\j2ee.jar -d ..\classes\headfirst\*.java
This should be all one line, not two. Notice the j2ee.jar in the classpath
After you finish the steps in the deploytool pages 32 - 54, write and compile your client app. Make sure you use call the getMessage method instead of the getAdvice method Page 57.
AdviceClient compile line Page 57:
javac -classpath %CLASSPATH%;%J2EE_HOME%\lib\j2ee.jar;AdviceAppClient.jar AdviceClient.java
Once again, one line not two.
AdviceClient run line Page 58:
java -cp %CLASSPATH%;%J2EE_HOME%\lib\j2ee.jar;AdviceAppClient.jar AdviceClient
Again, one line.
I hope this helps anyone having problems in a Windows DOS shell.
jpp