Publishing Java Applications

Creating JAR (Java ARchive) file 


1. From command line

      a.  Run command: jar cvf Hello.jar

              - Creates default MANIFEST.MF

               - Specify the main class   

             jar cvmf MANIFEST.MF Hello.jar

       b. Run JAR File

             java -jar Hello.jar

2. From IntelliJ IDEA

     File -> Project Structure -> Artifacts -> JAR -> Find Main Class -> Include in project


     


- Build -> Build Project


Comments