Making executable JAR files with WinRAR or WinZip

xiaoxiao2021-03-06  145

A way I have explored myself, it is relatively simple, I don't know if you have tried it.

Step: 1. Newly build a meta-inflicate in the application file root directory, create a new manifest.mf file in this directory, the file content is main-class: mainclassname, the end of the latter, mainclassname is the first Class's full class name (including package name, without extension class), remember that there is a space before mainclassname; 2. Pack all files in the application root directory, format Zip; 3 The extension is changed to jar; 4, double-click the JAR file directly or run with java -jar jarname.jar. I hope I can help everyone.

转载请注明原文地址:https://www.9cbs.com/read-127437.html

New Post(0)