Configure Launch4J to use 32-bit JVM only

Daniel Rikowski picture Daniel Rikowski · Apr 22, 2010 · Viewed 8.8k times · Source

I'm using Launch4J to start my Java application and if an x64 JRE is present on the system, Launch4J seems to prefer it.

Unfortunately my application cannot run on a 64 bit JVM because I'm loading a 32 bit DLL, which is not possible and leads to an UnsatisfiedLinkError.

Is there any way to force/trick Launch4J to use a 32 bit JVM only?

Answer

Feneck91 picture Feneck91 · Sep 27, 2012

I have exactly the same problem : Into 64 bits environment if both 32 ans 64 bits JDK/JRE are installed this tools always detect the 64 bits version. I have patched the source (java + C++) code to make my own version and re-compile all. I add a check box to FORCE the 32 bits JDK/JRE detection into 64 bits windows environment. Just donwload the version and use it as the original one.

Version : launch4j-3.0.2-win32_Java32bitsDetection