6

I am using launch4j for the first time and I get systematic compile error (the same on OSX and windows xp). Here is the project xml file :

<launch4jConfig>
  <dontWrapJar>false</dontWrapJar>
  <headerType>gui</headerType>
  <jar>C:\Temp\QuotaSatellite\QuotaSatellite.jar</jar>
  <outfile>C:\Temp\QuotaSatellite.exe</outfile>
  <errTitle></errTitle>
  <cmdLine></cmdLine>
  <chdir></chdir>
  <priority>normal</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl></supportUrl>
  <customProcName>false</customProcName>
  <stayAlive>false</stayAlive>
  <manifest></manifest>
  <icon></icon>
  <jre>
     <path></path>
     <minVersion>1.6.0</minVersion>
     <maxVersion></maxVersion>
     <jdkPreference>preferJre</jdkPreference>
  </jre>
</launch4jConfig>

and here is the log on windows xp :

Compiling resources
Generated resource file...

LANGUAGE 0, 1
2 RCDATA BEGIN "1.6.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

net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "C:\launch4j\bin\windres.exe": >CreateProcess error=2, Le fichier spécifié est introuvable

I have tried also with the manifest file and got the same error. Why launch4j expects bundle JRE that my jar does not need ? Your help will be very much appreciated

philippehenri
  • 167
  • 2
  • 9
  • get ld.exe and windres.exe file from MinGW installer available from its project website http://www.mingw.org/ (under MinGW default installation's bin folder) and put it into the Launch4J default installation's bin folder. Check the same solution here http://stackoverflow.com/questions/6293496/exception-in-launch4j – ee. May 18 '12 at 08:36
  • Thank you for this answer. Meanwhile I moved to IzPack which fits my needs. – philippehenri May 20 '12 at 16:54
  • That was the exact error I would get every time I ever tried to use launch4j. If it really is a problem with missing mingw files, the developers should really think about indicating as much somewhere within that cryptic string of errors >_< I typically just use JSmooth, but that has it's own issues as well. – arkon Aug 25 '12 at 13:26

0 Answers0