• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFEJB, prob in ch1

 
Puneet Vashisht
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the lib/j2ee.jar in your CLASSPATH?
Thats the first likely suspect.
 
Puneet Vashisht
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ramnathan Ravindran
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic