简体   繁体   中英

install4j and pref-jre.cfg

We have a few customers who are getting a JVM Error when running our application which is built with install4j. In most cases they have a pref-jre.cfg file in the .install4j folder which is incorrect. Such as they upgraded their java version, and the java reference in pref-jre.cfg no longer exists. So editing that file to point to the right location fixes the problem.

However, I cannot figure out how the pref-jre.cfg got there in the first place. The application install does not create it, we didn't advise them about that, and they are not sophisticated enough to create one.

Does anyone have any idea about what situations might automatically create that file?

Or, in general, how is install4j supposed to be handling updates of the Java environment?

Thanks

The installer writes the path of the JRE that it is running with to pref_jre.cfg . If that JRE is a bundled JRE, the corresponding location in the installation directory is written instead. You can set the value yourself with the API , Any installed launcher will use that JRE. If the version changes and becomes incompatible or if the path no longer exists, the launcher will perform the JRE search sequence configured on the "General settings->Java version" step. If no JRE can be found with that search sequence, an error will be displayed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM