Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 54650 invoked from network); 2 Feb 2001 12:25:00 -0000 Received: from unknown (HELO wbnsmail.gtl.com) (194.203.31.194) by h31.sny.collab.net with SMTP; 2 Feb 2001 12:25:00 -0000 Received: by wbnsmail.gtl.com with Internet Mail Service (5.5.2650.21) id ; Fri, 2 Feb 2001 12:24:31 -0000 Message-ID: <41FBBB1B17AFD4119ECE0003470888360331D2@wbnsmail.gtl.com> From: Christopher Kirk To: "'tomcat-user@jakarta.apache.org'" Cc: "'ck@newcity.com'" Subject: RE: ClassPath question? Date: Fri, 2 Feb 2001 12:24:30 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-2022-jp" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N _Normally_ the core java libraries are inserted onto the classpath for you, hence you may not always have to setup a classpath. javax.* is not part of the core libraries, its name actually stands for 'java extensions'. Over time some of these extensions, such as swing (javax. swing) have made it into the normal distribution but others such as servlets have not. If you want to see what is or is not in the core distribution, go into the libs directory of the JVM installation of the JRE and open up rt.jar.. in there you will find java.io, java.util etc etc. - CK Brainbench MVP Java2. > -----Original Message----- > From: Jian Zhang [mailto:jian@FLYINGCOLOR.com] > Sent: 02 February 2001 11:51 > To: 'tomcat-user@jakarta.apache.org' > Subject: RE: ClassPath question? > > > Thanks. I just tried "/usr/local/tomcat/lib/servlet.jar" and > it worked. > > I noticed that the first line HelloWorld.java file is > "import java.io.*" > But it did not create any problem on compiling given previous > classpath. > > Does it mean java libs have some difference from each other? > > > jian > > > > As far as classpaths are concerned, you can think of a jar file as a > > directory (not a file). That is, unlike files (.class files > > especially) you > > must explicitly specify the jar file on the class path. > > > > That is, to pick up the servlet jar file, specify the > > following path. You > > will have to do a similar thing for each of the other jar files too. > > > > /usr/local/tomcat/lib/servlet.jar > > > > > > - Ck > > > > Brainbench MVP Java2. > > > > > > > -----Original Message----- > > > From: Jian Zhang [mailto:jian@FLYINGCOLOR.com] > > > Sent: 02 February 2001 11:23 > > > To: 'tomcat-user@jakarta.apache.org' > > > Subject: ClassPath question? > > > > > > > > > Hello; > > > > > > Can anyone help with this compile error msg: > > > > > > javac HelloWorld.java > > > > > > HelloWorld.java:1: Package javax.servlet not found in import. > > > import javax.servlet.*; > > > ^ > > > I have included the servlet.jar in my classpath: > > > > > > printenv CLASSPATH > > > /usr/local/jdk1.2.2/lib:/usr/local/tomcat/lib:/usr/local/ant/lib > > > > > > and servlet.jar is in the folder /usr/local/tomcat/lib > > > > > > what have I missed? > > > > > > Thanks in advance > > > > > > jian > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, email: > tomcat-user-help@jakarta.apache.org > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, email: tomcat-user-help@jakarta.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, email: tomcat-user-help@jakarta.apache.org >