Добавить
Уведомления

How to Make an Executable Jar File

How to Make an Executable Jar File. Step 1) Go to your project directory, where the java files are. Step 2) Compile your java files with the command: *javac File.java File2.java File3.java* //etc Step 3) Create a manifest.mf file that contains: *Main-Class: File* Step 4) Pack together in a jar file. Use this command: *jar -cvmf manifest.mf JavaExecutable.jar File1.class File2.class File3.class picture.png* Step 4 does the actual work. It puts everything into a jar file after the *JavaExecutable.jar* part of the command. Notice I can also have pictures/other types of files.

12+
20 просмотров
2 года назад
5 декабря 2023 г.
12+
20 просмотров
2 года назад
5 декабря 2023 г.

How to Make an Executable Jar File. Step 1) Go to your project directory, where the java files are. Step 2) Compile your java files with the command: *javac File.java File2.java File3.java* //etc Step 3) Create a manifest.mf file that contains: *Main-Class: File* Step 4) Pack together in a jar file. Use this command: *jar -cvmf manifest.mf JavaExecutable.jar File1.class File2.class File3.class picture.png* Step 4 does the actual work. It puts everything into a jar file after the *JavaExecutable.jar* part of the command. Notice I can also have pictures/other types of files.

, чтобы оставлять комментарии