• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

HFEJB, prob in ch1

 
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
 
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
 
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...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!