jQuery in Action, 2nd edition*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse Bug? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse Bug? " Watch "Eclipse Bug? " New topic
Author

Eclipse Bug?

Bigglesworth Naruki
Greenhorn

Joined: Nov 05, 2001
Posts: 14
I'm sure it's something I'm doing wrong, but when I try to import javax.servlet.* into a Java file, Eclipse refuses to recognize it. I've tried everything I can think of, but it still acts like that's not part of Java.
But when I compile it from TextPad, I get no errors.
Any ideas?
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Eclipse has its own classpath settings, and ignores the classpath from the external system.
With your project open in Eclipse, go to the "project" menu at the top. At the botton of that menu you should see "properties". Click this to open the project properties browser dialog. On the left you should see a list of property groups. Click "Java Build Path" then select the "Libraries" tab.
You now need to click the "Add External JARs" button at the right of the dialog, and navigate the file opener to wherever your servlet jar lives. Select the appropriate jar file and it will be added to the classpath for the Eclipse project.
You should then find that you can compile servlet code with no problem. All you need now is to get your code working


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Bigglesworth Naruki
Greenhorn

Joined: Nov 05, 2001
Posts: 14
Bravo! Thank you, it's working perfectly now. I knew I was doing something stupid.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse Bug?
 
Similar Threads
[eclipse] {@inheritdoc} not working in Eclipse
How to re-format imported code?
How to Configure Eclipse
What IDE are businesses using...
Adding Webservices Plugin to Eclipse.