> > The JSDK when installed has a jar file where the the directories
> > java/lang, java/util, etc. are archived. It pulls the class files from
[quoted text clipped - 3 lines]
> got the java bin dir in my path, but other than that I don't know how it
> knows where to look.
I believe that there is a default classpath that is always available to
the compiler and interpreter even if you set a CLASSPATH. If you look
under the jdk directory, you should see the jre directory. In there
there is a directory called lib. In that directory there is a file
called rt.jar. If you look at it's contents with jar -tvf, you should
be able to see the packages.
Note that you also have a file called src.zip if you downloaded the
full JSDK. If you unzip this, you should be able to see the source code
of the most of the classes in the JSDK.
Brett Foster - 09 Dec 2004 09:03 GMT
> I believe that there is a default classpath that is always available to
> the compiler and interpreter even if you set a CLASSPATH. If you look
> under the jdk directory, you should see the jre directory. In there
> there is a directory called lib. In that directory there is a file
> called rt.jar. If you look at it's contents with jar -tvf, you should
> be able to see the packages.
Of course this wasn't the case for JDK 1.1/1.0 where there wasn't a
built in/auto path... Thank god those days are gone! I think. (I have a
soft spot for 1.1.)
To the OP: You can also build your own classloader and specify the
method by which classes are found. :)
Brett
> Note that you also have a file called src.zip if you downloaded the
> full JSDK. If you unzip this, you should be able to see the source code
> of the most of the classes in the JSDK.