问题
I'll ship my application as .exe file on a cdrom.
When the end user gonna start the program, the following events should occurs (in case he hasn't got any valid JRE installation):
If the user hasn't got an internet connection, the program (exe file) should use an embedded JRE (shipped with the cdrom)
If the user has got an internet connection, he should be redirected to the JRE download location (java.com). He should then download the JRE and install it. I won't use the bundled JRE for a user with an internet connection.
I configured both download path and JRE bundle in Launch4J, but I can't find how i could configure it for my specialities. Anyone got a clue or solution?
Thx
回答1:
Refer to file:///C:/Program%20Files/Launch4j/web/docs.html#Configuration_file
Certain conditions must be met as follows:
Using <path>
in jre tab:
Run if bundled JRE and javaw.exe are present, otherwise stop with error.
Using <path> + <minVersion> [+ <maxVersion>]
in jre tab:
Use bundled JRE first, if it cannot be located search for Java, if that fails display error message and open the Java download page.
Using <minVersion> [+ <maxVersion>]
in jre tab:
Search for Java, if an appropriate version cannot be found display error message and open the Java download page.
So, you must meet the second condition...
来源:https://stackoverflow.com/questions/7610765/launch4j-jre-installation-or-bundled