Hi guys, I have attempted to write my first EJB piece, but i am stuck in the compilation itself. I D/Led J2EE SDK 1.3.1 and JDK 1.3.1_08 on my machines. I am able to bring up the server (j2ee) and shut it down peoperly using (j2ee -stop) I have entered both the folders in my class CLASSPATH and PATH. JAVA_HOME and J2EE_HOME are set properly. Still i am getting the same error.
D:\JavaCertification\SCBCDCertification\projects\advise\src\headfirst\AdviseBean.java:3: package javax.ejb does not exist import javax.ejb.*; ^
Do i need to do setup any thing else? please advise Thanks in advance
Then i have one more question. Even the regular packages are also part of JAR files only. Then why they don't have any issues? I mean i don't mention the name of src.jar in the CLASSPATH. Then how come they are working?
Java is special I think beginning with Java 1.1, or maybe Java 1.2, you no longer have to include a classpath for Java's own stuff. In other words, the compiler and the JVM that ship with J2SE SDK always KNOW how to find their own classes/jars, as long as you don't move things around within the installation directory for your J2SE install. But you get ONLY the J2SE stuff "for free" (kind of like not having to do an explicit import of things from java.lang). ALL other classes/jars must be *somehow* on the classpath if your code needs to use them. So you can either do this permanently or semi-permanently through an environment variable or with a command-line -classpath or -cp setting when you run the compiler or the JVM. cheers, Kathy
Hi Kathy, Thank you for the prompt response. Now I am clear about these details. BTW, I have half way done with the architectural view of Head First EJB. Let me tell you, this is the best ever architecture explanation chapter that I have read. I never thought understanding architecture is so easy! Thanks for sharing your knowledge (though it costs us a little!!!)