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:

Hi

Posted by Sandeep on May 03, 2001 at 12:59 AM

> 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