Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: package does not exist error

Reply
Thread Tools

Re: package does not exist error

 
 
sufia
Guest
Posts: n/a
 
      07-07-2003
I had the exact same problem too. The problem with mine was the
CLASSPATH variable. Check to make sure that your path's right.
good luck.


http://www.velocityreviews.com/forums/(E-Mail Removed) (Mitch Ratisher) wrote in message news:<(E-Mail Removed) om>...
> With a jar or zip file, you have to explicitly include the file name
> of the archive in the classpath. Otherwise, there is no way to know
> which archive to look in. Either append the full path to servlet.jar
> (or whatever file has the servlet classes) to CLASSPATH, or do
> something like:
> javac -classpath ".;d:\j2ee\lib\servlet.jar" SampleServer.java
>
>
> "Netmasker" <(E-Mail Removed)> wrote in message news:<bcvrs0$2ba$(E-Mail Removed)>...
> > I try to compile the file "SampleServer.java" which contains code for
> > implementing a sample servlet. I use this command: "javac SampleServer.java"
> > but I take the following errors (and others) because it can not find
> > the necessary classes.
> > -----------------------------------------------------------------------
> > SampleServer.java:2:
> > import javax.servlet.*; import javax.servlet.http.*;
> > ^
> > SampleServer.java:2: package javax.servlet.http does not exist
> > import javax.servlet.*; import javax.servlet.http.*;
> > ^
> > -----------------------------------------------------------------------
> > I suppose that is because I haven't done anything with the "CLASSPATH".
> > I am using Windows 2000 Server and I have installed both "j2sdk1.4.1_02" and
> > "j2sdkee1.4".
> > But even if I run the above command from the directory "\j2sdkee1.4\lib"
> > which contains the libraries (in the *.jar files) I take the same errors.
> > Why this happens or what else could be wrong ????
> >
> > TIA

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: package jxl does not exist shaun.wiseman91@gmail.com Java 16 02-24-2013 11:08 PM
"Package does not exist" error hiits100rav Software 0 04-10-2011 12:47 PM
Servlet error ...package Javax.servlet does not exist cormacdebarra@gmail.com Java 4 11-11-2006 01:55 PM
package does not exist error Nachiketh Java 1 04-17-2004 11:46 PM
How do you figure out the LDAP://? ("Error authenticating. Error authenticating user. The specified domain either does not exist or could not be contacted") mrwoopey ASP .Net 3 06-30-2003 10:11 PM



Advertisments