How do I compile a Java JAR file?

Tam ca

New member
How do I compile a Java JAR file?
Answer
Creating an executable JAR file.
  1. Compile your java code, generating all of the program’s class files.
  2. Create a manifest file containing the following 2 lines: Manifest-Version: 1.0 Main-Class: name of class containing main. …
  3. To create the JAR, type the following command: jar cmf manifest-file jar-file input-files.
 

Tìm kiếm

Back
Top