The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

class path

Posted by Siddhant Kumar on May 03, 2001 at 1:59 AM


we set path for the executables.. i.e. for dll's or exe's in autoexec.bat (win9x) and set classpath variable for jar's and other pakages so that when class loader (JVM in this case) know the path where to find the specific class to include. If u had worked in C u may be knowing that u have to set INCLUDE path before running the program from the IDE.

Hope this will answer both of u :)

bye

Siddhant Kumar

> > hello sir,

> > i am beginner of java.

> > For running java code we set path path=%path%;c:/jdk1.3/bin;
> > this is for taking java classes to any directory.

> > but for running java servlet(jsdk) we want to set classpath.

> > i confused.
> > what is classpath?
> > 1.why we set classpath for servlet?
> > 2.why we don't set classpath for jdk?
> > 3.how to set classpath for servelt?

> >
> > please explain breifly

> >
> > Regards.
> > feroz

> We set classpath variable to guide Class Loader for where from to load the classes.

> I do not know for sure ki why we do not set classpath for JDK. I think because there is some entry in the registry. Maybe if u come to know pls inform me

> We set the class path for Jsdk because servlet development requires classes like javax.servlet.*; and more packages. Now these packages and classes are packed in Server.jar and Servlet.jar. So u need to put these jar files in class path so that the class loader can locate these classes..

> I hope this satisfies u.
> with regards,
> Sandeep






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us