• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Brand new and can't start

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic