• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Information regarding Jar files

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ....
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic