Please correct me if I am wrong...

Gardner,

It may be more correct to think of the CLASSPATH as an OS environment variable
which holds a list of the complete path to each directory or java archive (jar)
file where your class files exist.  For example if my CLASSPATH was: (line feeds
after semicolon for clarity only)
.;
C:\tomcat\lib;
C:\jdk1.3.1\jre\lib\rt.jar;
C:\tomcat\lib\servlet.jar;
C:\tomcat\lib\jasper.jar;
C:\orant\JDBC\classes12.zip

The java compiler will search the current directory and then C:\tomcat\lib for
your class files.  It will also search the other 4 directories defined in left to
right order to look through rt.jar, servlet.jar, jasper.jar and finally
classes12.zip for the classes it needs.  Note that the last item in the CLASSPATH
ends with classes12.zip  An uncompressed zip file functions just like a jar file
and in this case the classes are JDBC methods provided by Oracle Corporation.

Hope this helps,
Dave


Gardner Monte wrote:

> The javax.com and javax.comm.http are packages of Source files that
> have been compiled and placed in a directory called the CLASSPATH.
> That directory is where the Java Virtual Machine looks when it
> tries to 'import' something.  You have to find out where your
> classpath is, and then put the Oreilly stuff in that directory.
>
> --Monte Glenn Gardner
>
> On Thu, 29 Nov 2001, ken dias wrote:
>
> > I am trying to get the concept of packages. The concept of packages is not
> > fully explained in the book Java Servlet Programming by Jason H. I tried the
> > ex. Guestbook in Chapter 9 but for some reason, it does not complile as it
> > does not import com.oreilly.CacheHttpServlet. However it has no problem
> > importing javax.com and javax.comm.http. Now all 3 are packages so why does
> > it not import com.oreilly.CacheHttpServlet?
> >
> > Thanks
> >
> > Ken
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> >
> > ___________________________________________________________________________
> > 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

Reply via email to