One thing that I am not clear about in the Headfirst
EJB book - what should I set my default classpath to? Do I need to set it to grab all of the jar files in my Sun/Appserver/lib dir? Also, I set it like a standard environment variable right?
I ask this basic question because the book has me do javac -classpath {$CLASSPATH}:MyPackage.jar when I'm compiling the client source code. So, if someone could clarify this for me I'd appreciate it. note: I was able to get my thing to compile by doing the following:
javac -classpath c:\sun\appserver\lib\ejb-3_0-api.jar;AdviceAppClient.jar
However, even with this I'm now unable to get it to run using the HF (and various modifications based on what worked for the compile) command of
java -cp {$CLASSPATH}:AdviceAppClient.jar AdviceClient
with all of them I get:
Exception in
thread "main" java.lang.NoClassDefFoundError: AdviceClient
My dir looks like this:
Directory of C:\My_Programs\EJBClass\Advice
01/25/2007 12:17 PM <DIR> .
01/25/2007 12:17 PM <DIR> ..
01/18/2007 11:00 PM 4,018 AdviceApp.ear
01/18/2007 04:44 PM 4,018 AdviceAppClient.jar
01/25/2007 12:34 PM 1,008 AdviceClient.class
01/18/2007 10:45 PM 1,152 AdviceClient.java
01/04/2007 07:34 AM <DIR> classes
01/02/2007 02:36 PM <DIR> src
I also followed the instructions for the deployment and have the server running. So what did I miss?