Leon, You seem to be having a time with the whole class finding issue. I would recommend picking up a book on Java and going over the CLASSPATH and JAR file sections. Any descent book should clarrify the whole issue for you.
Basically, the .jar file works exactly like class files residing in a directory. When you see a .jar file, mentally replace it with the directory structure and files inside it, treating the .jar file itself as a directory. So, if your .jar file contains one java class: com.myspace.mypackage.myclass.class and is located at c:\jars\myjarfile.jar then you could imagine that under c:\jars\myjarfile.jar exists the directory structure of com\myspace\mypackage\myclass.class. So, in your CLASSPATH you would have the entry c:\jars\myjarfile.jar. When java searches through your classpath to find the class you are using it will find the jar file then look inside of it to see if it contains (in this case) com\myspace\mypackage\myclass.class. With this myfarfile.jar in your classpath issuing 'javap com.myspace.mypackage.myclass' at a command prompt should output the class signature since java finds it inside of the .jar file. >From the sounds of it your Servlet.jar file is not in your classpath. According the the post at the beginning of this thread you had to manually add it to your compile command. Also, I'm pretty sure that if you open a command window and do some sets they disappear after the shell is closed. You need to set the desired values in your autoexec and log off or reboot. Or, set them in a shell window and keep using that shell window. I hope this helps. Peter Fournier [EMAIL PROTECTED] -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Leon Vermaak Sent: Monday, February 25, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: Re: classpath/servlet compilation error: javax package not found! I understand the jar file concept, but I have a hard time understanding how the compiler finds them. Because of the error: javax package not found! I the installation instructions it said to set classpath= to nothing that way I can compile from anyhwere without having to set the classpath? If you can tell me where to find hte beginners series I would gladly read it. Thanks ----- Original Message ----- From: "Raghupathy, Gurumoorthy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 25, 2002 12:36 PM Subject: Re: classpath/servlet compilation error: javax package not found! > Actually, > servlet.jar file is a collection of classes known as > packages zipped into a bundle ( usually a .jar or .zip file ). > javax.servlet.* is a part of the package which is bundled in > servlet.jar. > Just imagine if this would not been the case then the whole > package will eat a lot of HARDDISK SPACE and > more env variable. > Just read a beginners series for JAVA which will explain the > concept of packages and .jar files > > > Sorry but this is how java work and we in the java community really like > this concept since it is one time compilation and thne can be put on any > platform.... > > > Regards > guru > > > -----Original Message----- > From: Leon Vermaak [mailto:[EMAIL PROTECTED]] > Sent: 25 February 2002 16:45 > To: [EMAIL PROTECTED] > Subject: classpath/servlet compilation error: javax package not found! > > > I am at a loss as to what I must modify in this file? > I managed to compile the program with javac -classpath "C:\Program > Files\Apache ...\common\lib\servlet.jar" > What I don't understand is why I put import javax.servlet.*; > if there is nothing on my drive called javax? > If Java is supposedly such a serious programing language and they pretend on > making it work? They aught to make easy for new commers to the language to > follow a details explination on how to do set the path to the respective > libraries that one is suppose to use to write one's servlets! > I appologize if this is simply my ignorace, but The least they can do is try > to include a page for newbies that will explain things in IDIOT PROOF TERMS. > > I am going to follow Markus Spath's lead and read on about ANT and Tomcat > Manager HOW-TO. > > Thanks for the replies. > > > ----- Original Message ----- > From: "Williams, William H" > <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 25, 2002 10:53 AM > Subject: Re: classpath/package question? > > > > There is a limit on how long environment variables like CLASSPATH can be. > > > > See if this helps... > > > > <<runStuff.txt>> > > > > > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
