• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Information regarding Jar files

 
Sridevi Baskaran
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic