Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

classes.zip

Posted on 2000-03-28
4
Medium Priority
?
656 Views
Last Modified: 2011-10-03
Hi all

I am new to Java, so please enlighten me on this simple question about classpath.

I have read from documents that for JDK 1.x, the classpath points to the jdk1.x/lib/classes.zip.

However, for JDK2, there is no such zip file. What is the equivalent file, and additional files I should point to?

Keith
0
Comment
Question by:keithcsl
4 Comments
 
LVL 1

Accepted Solution

by:
computerpunk earned 200 total points
ID: 2665932
From what I know ,
The files that you should point to are :
src.jar that is located at the root of your JDK2 directory
dt.jar,tools.jar located at the lib directory
Java has changed from the zip format to the jar (Java ARchive) format which is basically the same as before.
Hope this helps ;)

Just in case you wanted to know : The equivalent file of classes.zip is src.jar if I have not mistaken.
0
 
LVL 4

Expert Comment

by:jerch
ID: 2666121
Hi keithcsl...
The src.jar contains the source code of the core Java API. In JDK 1.2.x, you don't actually have to set the classpath. It will automatcally search the packages in <install directory>\jdk1.2.x\lib.

best regards...
Jerson
0
 
LVL 19

Expert Comment

by:Jim Cakalic
ID: 2666652
The class files are now packaged in rt.jar. You should find this in the jre/lib directory beneath wherever you chose to install the JDK. This should be all that the JDK itself requires. As Jerson notes, you should not have to explicitly add the runtime jar to your CLASSPATH.

Most vendors and even open source distributors are now packaging in jar files. For any such products you want to use, you will add an entry to CLASSPATH that provides a full path up to and including the jar file.

Best regards,
Jim Cakalic
0
 
LVL 1

Author Comment

by:keithcsl
ID: 2691490
ahhh, thank you all. and to jerch and jim_cakalic, yes, i do not need to explicitly load the class path. it's done automatically. thank you for that info.

Keith
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question