File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Information regarding Jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Information regarding Jar files " Watch "Information regarding Jar files " New topic

Information regarding Jar files

Sridevi Baskaran

Joined: Jun 29, 2009
Posts: 7
Hi friends,

I am preparing for my SCJP 5.0 . I am not able to understand the development part , that is regarding jar files . I am not even able predict the possible answer . Is there any solutions to this ? I kindly welcome any valuable suggestions ....

Thanks ....
Atwal Usha
Ranch Hand

Joined: Sep 10, 2009
Posts: 137
Hi Sridevi,

JAR files are basically used to bundle application so as to distribute it to others to install.
There are some points which could help in getting any question related to JAR files and they are as follows:

  • They are used to compress and archive data.
  • When a jar file is created the exact tree structure is represented or in other words the jar file contains the directory and all its subdirectory tree and files as it is.
  • All of the classes in the JAR file can be accessed via classpaths, by the java and javac command without ever unJARing the JAR file.
  • When finding a JAR file using a classpath, the name of the JAR file must be included at the end of the path which is unlike to finding a package file in a classpath.
  • If you put JAR files into the jre/lib/ext subdirectory tree, java and javac can find them, and use the class files they contain i.e these subdirectories need not to be mentioned in the classpath as it is a built in function of Java.
  • The command used to create a JAR file is jar.

  • I hope these points will help you in getting the answer to the questions correctly however if there is any particular question where you have any doubt then you could please post that.

    Java Certification Exam Mock Tests: SCJA  SCJP 5  SCJP 6  SCJP 6 (Online Training)  SCJP 6 (Instructor Led Training)   SCWCD 5   SCBCD 5  SCEA 5
    I agree. Here's the link:
    subject: Information regarding Jar files
    jQuery in Action, 3rd edition