Hii guyz, i've just started preparing for SCBCD, n immediately i encountered this prob in the very first example (The Advice Guy Bean). I'm using j2sdk 1.4.2 and j2sdkee1.3.01 I made a bean class named AdviceBean as asked by the author. Its second line sayz : "import javax.ejb.*;" but the ejb package doesnt seems to b present in the javax package. And so when i compile the file, it gives me an error "package javax.ejb does not exist" Can anyone plz help me out on that!! Thankz Puneet
Is the lib/j2ee.jar in your CLASSPATH? Thats the first likely suspect.
posted 13 years ago
yes dear CLASSPATH is set accordingly, moreover classpath comes into piture when i run the application. Whereas in this case i'm just compiling it with "javac AdviceBean.java" command. and the error i get is "package javax.ejb does not exist". Plz help me out, as i'm not able to move anyfurther. Thankz for your reply though. Have a gr8 day. Puneet
Puneet, When you are compiling using the command "javac", try using the "-classpath" variable. You can reference all the required jars through this variable. An example, javac -classpath "D:\Jars\j2ee.jar" com\headfirst\AdviceBean.java
Hope his helps...
Regards<br />- Ramnathan<br />SCJP 1.4, SCBCD 1.3, OCA