Solved

classes.zip

Posted on 2000-03-28
4
646 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 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 video teaches viewers about errors in exception handling.

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now