tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Video Tutorials > Java > Basics > How to create Java Executable JAR

How to create Java Executable JAR 

The following video shows creating an executable JAR file in Java.

  1. Create a simple standalone java application, for instance a simple Swing UI application.
  2. Compile and run the application for sanity.
  3. Create a manifest file with Main-Class attribute.
  4. Ensure to enter a new line at the end of manifest file. Otherwise some systems may throw failed to load Main-Class error.
  5. Execute JAR command from the console (Ensure to include JDK_HOME\bin in Path environment variable).
  6. Run the executable JAR from the console and "Open with" windows dialog.

Download Source code for this article (1 KB)


bl  br