Eclipse IDE and Import issues
Lately I've been trying to use Eclipse IDE for Java development. I am basically new to Java programming. I am trying to execute a servlet project using Tomcat5.5 as container. I get problems when I give instructions import javax.servlet.*
in my class files as Eclipse complains that it cannot find this particular package. I am working in a Windows environment and have already included the following in 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 what could be wrong?
a source to share
One last thing: the value CLASSPATH
you posted looks suspiciously like the value of a Windows system environment variable. You should be aware that every IDE and Java EE application server, including Eclipse and Tomcat, completely ignores the CLASSPATH values. It is best to know how to set it correctly CLASSPATH
for your situation. I don't have an environment setup CLASSPATH
on any computer that I work on.
a source to share
There is a similar question here: How do you make eclipse recognize Java EE jar files so that servlets can compile
a source to share