Bookmark Topic Watch 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
  • A Java ARchive(JAR) file is used to group java class files and other files needed for an application. It is a zip file with different extension, and thus one can create/view/modify with zip utilities such as winzip.
  • Short for Java ARchive, a platform independent file format used to bundle multiple files into a single archive file. Typically a JAR file will contain the class files and auxiliary resources associated with applets and applications. However, a JAR file could contain libraries and extensions to the Java language itself, entire Java Applications, or Java utility code. By convention, JAR files end with a .jar extension.
  • A JAR file can also contain a manifest that includes archive content metadata, such as which class in the archive contains the main method to be used when treating the jar file as an executable.
  • A JAR file can be made executable, i.e. started by double-clicking it. See here and here for more information.
  • How do I make a .jar of my Java program?
    • First compile your java file(s) using javac command. Example javac HelloWorld.java will generate HelloWorld.class
    • Then use jar command. Example jar cvf Hello.jar HelloWorld.class .(Type jar to see various archive options)
  • The Java documentation has more information here and here

  •  
      Bookmark Topic Watch Topic
    • New Topic