Skip to content
Advertisement

Cannot run Launch4j (illegal access)

I would like to create an .exe file for my java desktop application. Hence, i saw that Launch4j was the best option.

When I ran. the file, i have the following error message.

JavaScript

I am working under Mac OS Catalina, version 10.15.3. and my Java version environment: openjdk version “11.0.7” 2020-04-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)

If you have any other program that could do the job, i’ll be glad to know. In fact, i am looking for something equivalent to InnoSetup for both OS (Windows and Mac)

Thank you for the help

Advertisement

Answer

I had this same error and found your question looking for a solution.

I ended up getting launch4j running by downloading openJDK 9.0.4 from the archive at https://jdk.java.net/archive/.

Running the launch4j.jar manually with this java version worked as expected:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement