• 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

Eclipse not recognizing Javax packages

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've configured my tomcat project in eclipse.
It's compiling everything except for the javax packages like servlet, etc.
Can't figure out what might be wrong.
Tried adding other jars from jre/lib folder.
Please help..
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two things:
1. You should create the project as a "Dynamic Web Project" and create a server for this project.

OR

2. Have the jar files with Servlet APIs included in the build path of Eclipse. If you are using Tomcat, then the jar files you need are:
Tomcat Installation Folder\common\lib\servlet-api.jar
and
Tomcat Installation Folder\common\lib\jsp-api.jar
[ April 30, 2007: Message edited by: Sunil Vasudevan ]
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks..
But where do I get these jars from?
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Sunil..
I forgot to notice the path given by you.
I included those jars and now servlet code compiles.
However, I also have javax.mail & javax.activation packages in code that don't compile.
Do we have a separate jar file for javax packages?
 
Sunil Vasudevan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. They come in a different jar file.

Try this link: http://java.sun.com/products/javamail/downloads/index.html

You can download the jar for Java Mail from here. But Java Mail also needs the activation framework. You will get that from http://java.sun.com/products/javabeans/jaf/index.jsp

Include these two jars in your build path.
 
Steve Renard
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Sunil..
I actually downloaded the Sun JDK & app server in the meanwhile.
I got those jars from there.
Really appreciate your help.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic