Reputation: 827
Lately I have been trying my hands on Eclipse IDE for java development. I am mostly a novice to java programming. I am trying a servlet project, using Tomcat5.5 as container. I am getting issues when I give import javax.servlet.*
statement in my class files, as Eclipse complains that it cannot find that particular package. I am working in windows environment, and have already included following on my classpath:
.;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Program Files\Java\jdk1.6.0_13\bin;C:\Program Files\Apache Software Foundation\Tomcat\common\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat\common\lib\jsp-api.jar;C:\Program Files\Apache Software Foundation\Tomcat\common\lib
Any ideas, as what might be going wrong?
Upvotes: 0
Views: 596
Reputation: 309008
One last thing: that CLASSPATH
value you posted looks suspiciously like a Windows system environment variable value. You need to know that every IDE and Java EE app server out there, including Eclipse and Tomcat, completely ignores CLASSPATH environment values. It's best to know how to set CLASSPATH
appropriately for your situation. I don't have a CLASSPATH
environment setting on any machine that I work on.
Upvotes: 2
Reputation: 827
Add a lib folder to the project and put in required jars. Then right-click on each jar and add to build-path.
Upvotes: 0