• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using j2ee packages

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have j2sdk1.4.1 currently installed, as well as j2sdkee1.3.1, and I need to use some j2ee packages in my Java classes, however, it cannot find the packages I specify. I've added j2sdkee to my classpath, but still no luck. I've also tried copying j2ee.jar into my jdk directory, but that didn't work.
In detail, here is what I need to do:
import javax.servlet.*;
Thanks for any suggestions.
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
set the CLASSPATH to the jar files in the lib directory of the sdk.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If all you need is the javax.servlet.* packages, you don't need the whole J2EE shebang. Your servlet container provides what you need. For example, Tomcat implements javax.servlet in servlet.jar.
Just make sure that this jar in in your classpath when you compile.
hth,
bear
P.S. Highly recommend ant to help you compile and set up classpaths easily.
[ August 12, 2003: Message edited by: Bear Bibeault ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic