Win a copy of Java Challengers this week in the Java in General forum!
    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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh
  • 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

  •  
    what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
      Bookmark Topic Watch Topic
    • New Topic