Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

package does not exist

843810Jul 24 2003 — edited Jul 24 2003
Hi,

I've an error while compliling my java files.

The error is shown below:

MyServlet.java:1: package javax.servlet does not exist
import javax.servlet.*;
^
MyServlet.java:2: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
MyServlet.java:6: cannot resolve symbol
symbol : class HttpServlet
location: class MyServlet


My environment is Windows 2000 Professional
I have Java installed on E:\server\java\j2sdk1.4.2
Also Tomcat installed on E:\server\tomcat

I have set my Envirenment from My Computer > Properties > Advanced > Environment Variables
Here is my environment variables

VARIABLE NAME VARIABLE VALUE
------------- --------------
ANT_HOME E:\server\tomcat
CATALINA_BASE E:\server\tomcat
CATALINA_HOME E:\server\tomcat
CATALINA_TMPDIR E:\server\tomcat\temp
CLASSPATH E:\server\java\j2sdk1.4.2\lib\tools.jar;
JAVA_HOME E:\server\java\j2sdk1.4.2
TOMCAT_HOME E:\server\tomcat
path %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;C:\winnt\system32;E:\server\java\j2sdk1.4.2\bin


What should I do to get success on compiling my java files ??
How to ensure that the package required on compiling is exist ??

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2003
Added on Jul 24 2003
1 comment
132 views