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