Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

launch4j bundled JRE error ."This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted"

I am using launch4j for the first time and I get following error. Here is launch4j error log.

Compiling resources
Generated resource file...
LANGUAGE 0, 1
2 RCDATA BEGIN "1.5.0\0" END
18 RCDATA BEGIN "1\0" END
21 RCDATA BEGIN "http://java.com/download\0" END
20 RCDATA BEGIN "32\0" END
101 RCDATA BEGIN "An error occurred while starting the application.\0" END
102 RCDATA BEGIN "This application was configured to use a 
bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END
103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
104 RCDATA BEGIN "The registry refers to a nonexistent
Java Runtime Environment installation or the runtime is corrupted.\0" END
17 RCDATA BEGIN "true\0" END

and here is generated xml file

<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>/DesktopApp/launch4j/applicationname.jar</jar>
<outfile>/DesktopApp/launch4j/applicationname.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir></chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<manifest></manifest>
<icon></icon>
<jre>
<path></path>
<bundledJre64Bit>false</bundledJre64Bit>
<minVersion>1.5.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
</jre>
</launch4jConfig>

Your help will be very much appreciated.If there are alternative for launch4j then please tell me.

like image 873
saurabh Avatar asked Nov 29 '22 07:11

saurabh


2 Answers

I was trying to use a *.png file as my icon but it wanted *.ico. Once I removed <icon>...</icon> from my config file this error disappeared.

like image 189
giraffe.guru Avatar answered Jan 25 '23 23:01

giraffe.guru


I ran launch4j application as administrator and the error disappeared for me.

like image 38
user2984174 Avatar answered Jan 26 '23 01:01

user2984174