This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
 
friki data migration
Ranch Hand
Posts: 772
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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