Create exe using launc4j java

I created an .exe file using luunch4j and build.xml ant in Java, but when I click on the .exe I get the message "could not find the main class program to exit". If I click on the .jar file it also gives me the message "Failed to load main class manifest attribute". What is the problem?


source to share

2 answers

Do you have a manifest file? In the manifest file, you specify the entry point (class) where the method is used main(String[] args)


More details:

Here's an example:

Manifest-Version: 1.0
Sealed: true

Main-Class: org.example.server.Lauch

Class-Path: lib\externalLib.jar 




I had the same problem and the solution for it was that I did not set the JRE6 location (in my case). You have to put it on the JRE tab in the Bundled JRE Path field.



All Articles