GeeCON Prague 2014*
The moose likes EJB and other Java EE Technologies and the fly likes Brand new and can't start Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Brand new and can Watch "Brand new and can New topic
Author

Brand new and can't start

Simon Ingram
Ranch Hand

Joined: Nov 30, 2003
Posts: 173
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

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Apr 09, 2004
Posts: 4
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.


I m a Chinese.<br />中国人
Simon Ingram
Ranch Hand

Joined: Nov 30, 2003
Posts: 173
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 ]
 
GeeCON Prague 2014
 
subject: Brand new and can't start