I was using launch4j for quite a while now. Not sure how it happened, but started to get following error when I try to invoke it from Eclipse:
launch4j: [launch4j] Compiling resources [launch4j] The system cannot find the path specified. [launch4j] F:\Projects\SI_TLS\launch4j\bin\windres.exe: preprocessing failed. [launch4j] Generated resource file... [launch4j] LANGUAGE 0, 1 [launch4j] 2 RCDATA BEGIN "1.7.0\0" END [launch4j] 18 RCDATA BEGIN "1\0" END [launch4j] 30 RCDATA BEGIN "2\0" END [launch4j] 1 24 "F:\Projects\SI_TLS\launch4j\SIPInspector.manifest" [launch4j] 1 ICON DISCARDABLE "F:\Projects\SI_TLS\launch4j\SIPInspector.ico" [launch4j] 21 RCDATA BEGIN "http://java.com/download\0" END [launch4j] 20 RCDATA BEGIN "128\0" END [launch4j] 101 RCDATA BEGIN "An error occurred while starting the application.\0" END [launch4j] 102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END [launch4j] 103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END [launch4j] 104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END [launch4j] 17 RCDATA BEGIN "true\0" END
Some facts:
1) The same wrapper configuration works on Linux.
2) The same configuration worked before on Windows but not gives me this error
3) Not sure what changed, maybe Java update
4) I tried uninstalling all Java versions on my machine and re-installing them. It did not help.
I do not understand why it happens and why launch4j says something is wrong with JRE, when in fact all is good. Eclipse uses it without problems, I can use 'java -version' from DOS. The only explanation would be there is a registry value or enivronment variable that launch4j depends to find valid JRE. How can I fix the problem?
Regards,
Zarko
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My PC is in a state where JRE and JDK version 7 are fully installed. When trying to install JDK 8 I get infamous but well known Error 1603. Java Update did not complete. Not sure if that is and how it is relevant to the issue.
Z
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The error does not say something is wrong with the JRE. The problem is in the resource compliation done by windres.exe. You can try setting the launch4j.tmpdir property using the -D option when running it or tmpdir property on the launch4j ant task when using ant. Though the paths look good. It shouldn't be a missing manifest or icon as these are first checked by launch4j.
Best regards,
Grzegorz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried changing tmpdir location. Still having the same issue. The logs keeps sayin this: [launch4j] Compiling resources [launch4j] The system cannot find the path specified. [launch4j] C:\Code\Projects\SI_Deluxe\launch4j\bin\windres.exe: preprocessing failed. [launch4j] Generated resource file... [launch4j] LANGUAGE 0, 1 [launch4j] 1 RCDATA BEGIN "C:\Program Files\Java\jre7\bin\0" END [launch4j] 2 RCDATA BEGIN "1.7.0\0" END [launch4j] 18 RCDATA BEGIN "1\0" END [launch4j] 30 RCDATA BEGIN "2\0" END [launch4j] 1 24 "C:\Code\Projects\SI_Deluxe\launch4j\SIPInspector.manifest" [launch4j] 1 ICON DISCARDABLE "C:\Code\Projects\SI_Deluxe\launch4j\SIPInspector.ico" [launch4j] 21 RCDATA BEGIN "http://java.com/download\0" END [launch4j] 20 RCDATA BEGIN "128\0" END [launch4j] 101 RCDATA BEGIN "An error occurred while starting the application.\0" END [launch4j] 102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END [launch4j] 103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END [launch4j] 104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END [launch4j] 17 RCDATA BEGIN "true\0" END
Logs do mention problem with JRE. I am not sure why you say the error has nothing to do with the JRE?
Zarko
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
These are not errors but error messages compiled as resources so that launch4j can display them in case java is not installed. It's just the content of the generated resource file.
Unfortunately there is no information from windres which file is missing. You can also try removing all files from your configuration: icon and manifest to check if that is not the problem.
Grzegorz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I remove the icon, manifest I get these errors, respectively:
BUILD FAILED
C:\Code\Projects\SI_Deluxe\build.xml:68: net.sf.launch4j.BuilderException: Icon doesn't exist.
If the files were problem I would not be able to use launch4j on Linux (where it works fine). I do have problems only on Windows. I am not able to install JDK or JRE 8 on my Windows without getting an infamous Error Code: 1603. I believe this may be the reason for me having this issue.
In any case thanks a lot for your responses Grzegorz.
Regards,
Zarko
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was able to find a solution for this problem. It was not the one I took lightly. I had to re-install Windows :-( Then, I installed Java and everything started to work again.
Conclusion, something with one of my previous Java installations went wrong on my PC. It then corrupted either some Registry Keys or Windows environment variables, which then caused things to fail for Launch4j in windres component.
All story short: fresh Windows installation fixed all my problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there!
I was using launch4j for quite a while now. Not sure how it happened, but started to get following error when I try to invoke it from Eclipse:
launch4j:
[launch4j] Compiling resources
[launch4j] The system cannot find the path specified.
[launch4j] F:\Projects\SI_TLS\launch4j\bin\windres.exe: preprocessing failed.
[launch4j] Generated resource file...
[launch4j] LANGUAGE 0, 1
[launch4j] 2 RCDATA BEGIN "1.7.0\0" END
[launch4j] 18 RCDATA BEGIN "1\0" END
[launch4j] 30 RCDATA BEGIN "2\0" END
[launch4j] 1 24 "F:\Projects\SI_TLS\launch4j\SIPInspector.manifest"
[launch4j] 1 ICON DISCARDABLE "F:\Projects\SI_TLS\launch4j\SIPInspector.ico"
[launch4j] 21 RCDATA BEGIN "http://java.com/download\0" END
[launch4j] 20 RCDATA BEGIN "128\0" END
[launch4j] 101 RCDATA BEGIN "An error occurred while starting the application.\0" END
[launch4j] 102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END
[launch4j] 103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
[launch4j] 104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END
[launch4j] 17 RCDATA BEGIN "true\0" END
BUILD FAILED
F:\Projects\SI_TLS\build.xml:68: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): F:\Projects\SI_TLS\launch4j\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\ARKO~1\AppData\Local\Temp\launch4j7440755013959708748rc C:\Users\ARKO~1\AppData\Local\Temp\launch4j5685493508934014615o
Some facts:
1) The same wrapper configuration works on Linux.
2) The same configuration worked before on Windows but not gives me this error
3) Not sure what changed, maybe Java update
4) I tried uninstalling all Java versions on my machine and re-installing them. It did not help.
I do not understand why it happens and why launch4j says something is wrong with JRE, when in fact all is good. Eclipse uses it without problems, I can use 'java -version' from DOS. The only explanation would be there is a registry value or enivronment variable that launch4j depends to find valid JRE. How can I fix the problem?
Regards,
Zarko
My PC is in a state where JRE and JDK version 7 are fully installed. When trying to install JDK 8 I get infamous but well known Error 1603. Java Update did not complete. Not sure if that is and how it is relevant to the issue.
Z
Hi Zarko,
The error does not say something is wrong with the JRE. The problem is in the resource compliation done by windres.exe. You can try setting the launch4j.tmpdir property using the -D option when running it or tmpdir property on the launch4j ant task when using ant. Though the paths look good. It shouldn't be a missing manifest or icon as these are first checked by launch4j.
Best regards,
Grzegorz
Hi Grzegorz!
I tried changing tmpdir location. Still having the same issue. The logs keeps sayin this:
[launch4j] Compiling resources
[launch4j] The system cannot find the path specified.
[launch4j] C:\Code\Projects\SI_Deluxe\launch4j\bin\windres.exe: preprocessing failed.
[launch4j] Generated resource file...
[launch4j] LANGUAGE 0, 1
[launch4j] 1 RCDATA BEGIN "C:\Program Files\Java\jre7\bin\0" END
[launch4j] 2 RCDATA BEGIN "1.7.0\0" END
[launch4j] 18 RCDATA BEGIN "1\0" END
[launch4j] 30 RCDATA BEGIN "2\0" END
[launch4j] 1 24 "C:\Code\Projects\SI_Deluxe\launch4j\SIPInspector.manifest"
[launch4j] 1 ICON DISCARDABLE "C:\Code\Projects\SI_Deluxe\launch4j\SIPInspector.ico"
[launch4j] 21 RCDATA BEGIN "http://java.com/download\0" END
[launch4j] 20 RCDATA BEGIN "128\0" END
[launch4j] 101 RCDATA BEGIN "An error occurred while starting the application.\0" END
[launch4j] 102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END
[launch4j] 103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
[launch4j] 104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END
[launch4j] 17 RCDATA BEGIN "true\0" END
Logs do mention problem with JRE. I am not sure why you say the error has nothing to do with the JRE?
Zarko
Hi Zarko,
These are not errors but error messages compiled as resources so that launch4j can display them in case java is not installed. It's just the content of the generated resource file.
Unfortunately there is no information from windres which file is missing. You can also try removing all files from your configuration: icon and manifest to check if that is not the problem.
Grzegorz
If I remove the icon, manifest I get these errors, respectively:
BUILD FAILED
C:\Code\Projects\SI_Deluxe\build.xml:68: net.sf.launch4j.BuilderException: Icon doesn't exist.
BUILD FAILED
C:\Code\Projects\SI_Deluxe\build.xml:68: net.sf.launch4j.BuilderException: Manifest doesn't exist.
If the files were problem I would not be able to use launch4j on Linux (where it works fine). I do have problems only on Windows. I am not able to install JDK or JRE 8 on my Windows without getting an infamous Error Code: 1603. I believe this may be the reason for me having this issue.
In any case thanks a lot for your responses Grzegorz.
Regards,
Zarko
I was able to find a solution for this problem. It was not the one I took lightly. I had to re-install Windows :-( Then, I installed Java and everything started to work again.
Conclusion, something with one of my previous Java installations went wrong on my PC. It then corrupted either some Registry Keys or Windows environment variables, which then caused things to fail for Launch4j in windres component.
All story short: fresh Windows installation fixed all my problems.
Thanks for sharing your findings!
Best regards,
Grzegorz