Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Brand new and can't start

 
Simon Ingram
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I am just starting with EJB and Kathy and Bert's EJB book. I have been to Sun and downloaded J2EE 1.3.1. (I already had SDK 1.4.1.) I followed the set up instructions, that is set the environment variables J2EE_HOME to c:\j2sdkee1.3.1 and the path variable to c:\j2sdkee1.3.1.\bin (I am on Windows XP) and then tried to compile the first program. The compiler tells me package javax.ejb does not exist. It doesn't like the import statement! Clearly a set up problem but after several hours of faffing around with the sun installation instructions I am none the wiser.
Would some kind soul please help!
regards
Simon
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you have to add j2ee.jar to your classpath while compiling. Then the error should disappear. You can do this with
javac -classpath (can also be cp ) $YOUR_LOCATION_OFJ2EE.JAR $YOURCODE.
Simply replace $YOUR_LOCATION_OFJ2EE.JAR with a path pointing to j2ee.jar (normally you find one in your app server lib dir) and then it should work

Originally posted by Simon Ingram:
Hi folks,
I am just starting with EJB and Kathy and Bert's EJB book. I have been to Sun and downloaded J2EE 1.3.1. (I already had SDK 1.4.1.) I followed the set up instructions, that is set the environment variables J2EE_HOME to c:\j2sdkee1.3.1 and the path variable to c:\j2sdkee1.3.1.\bin (I am on Windows XP) and then tried to compile the first program. The compiler tells me package javax.ejb does not exist. It doesn't like the import statement! Clearly a set up problem but after several hours of faffing around with the sun installation instructions I am none the wiser.
Would some kind soul please help!
regards
Simon
 
Anderson leeak
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys
this my local variable setting,i aslo ues windowsxp OS
ClASSPATH:%JAVA_HOME%\lib;%TOMCAT_HOME%\lib;%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\locale
J2EE_HOME:c:\j2sdkee1.3
JAVA_HOME:C:\JDK
PATH:.;c:\JDK;c:\JDK\bin;c:\j2sdkee1.3\bin
i also ues j2sdk1.3.1 i install the j2sdk and jdk on C: so you can change your way.
 
Simon Ingram
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot guys! I knew it was something simple, but without your help I would never have found the problem.
regards,
Simon
[ April 21, 2004: Message edited by: Simon Ingram ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic