The user doesn't care what version you are using or if you even switch to aĬompletely different platform. How do you do that? With the bundling of runtime Users to install a system wide dependency, imagine you'd like to update toĪ higher version of Java. Your best option is to bundle the required runtime. JAVA_HOME, but if 8 is only installed and JAVA_HOME is pointing to it, then You could configure launch4j to use min 17 and bundledJreAsFallback with No way 8 is going to be used based on the registry search. Regarding the registry search you will not get hung up on old version if Other applications using this approach it only detects that that Java isĪctually available but not its version. You can configure Launch4j to use the JAVA_HOME variable, but like most Will Launch4J 3.14 detect Adoptium Java 17 based solely on the presence of the JAVA_HOME environment variable, or will it not? If it will not, I'm going to ditch Launch4J altogether (see JAVA-240), as it would be useless if it doesn't work with Adoptium without some special throwback registry detection.įollow-up-question: If a user has installed Oracle Java 8 using the installer (thus setting the registry to point to Oracle Java 8), and then installed Adoptium Java 17 by unpacking the distributable and setting the JAVA_HOME environment variable to point to Adoptium 17, will Install4J be able to detect JAVA_HOME and use Adoptium 17? Or will it get hung up on the fact that there is a registry setting for Oracle Java 8, and fail because Java 8 doesn't meet the minimum criteria in my configuration requesting at least Java 17? We can provide instructions for the user to verify or set JAVA_HOME, as this is the most cross-platform, de-facto standard for detecting Java. We cannot assume that the user has found some installation checkbox to use JavaSoft/Oracle registry keys. The users are expected to download a JRE, normally Adoptium. The distributable will not have a JDK included. Is there any additional setting to detect the java version based onĬan someone confirm the latest behavior regarding detection of JAVA_HOME? I'm using Launch4J 3.14 in combination with the launch4j-maven-plugin to produce foobar.exe. We have set the JAVA_HOME variable and even when calling java-versionįrom the command line we can see, openJDK and version 11.0.1. I have downloaded the JRE (not JDK) installer as an MSI file.Īs you know, Oracle has changed their license policy and moe and moreĪs openJDK comes with a zip file, without installed, it does not Options in the tree, disabled by default: In the 3rd step of the "JRE With Hotspot" wizard, look for 2 additional On Tue, Jan 8, 2019, 16:03 thomas kellerer is an open ticket for allowing too check the JRE through environment Great that you've got it working, nice idea. Or would it be possible to "fallback" and to allow wildcards as Java version, so any version could be allowed (if that would then still work for launch4j.) Java_Home is set normally as it is used for many other purposes as well. Is there a reason not to use JAVA_HOME (maybe as fallback)? Specifying the path also does not work as I have openJDK on C: my colleague on D. How will launch4j work with it without the registry entries?īundling Java is one option, but it requires to maintain Java in the application as well. OpenJDK does not provide any installer, therefore it does not creates registry entries. To unsubscribe from further messages, please visitĬmdLine: F:\Testing\test-0.0.1-SNAPSHOT-jar-with-dependencies.exe -l4j-debugĦ4-bit search: SOFTWARE\JavaSoft\Java Development Kit.ģ2-bit search: SOFTWARE\JavaSoft\Java Development Kit.Ħ4-bit search: SOFTWARE\IBM\Java Development Kit.ģ2-bit search: SOFTWARE\IBM\Java Development Kit.Įrror msg: This application requires a Java Runtime Environment 11.0.1īut let me ask additional questions please: Sent from because you indicated interest in Is there any additional setting to detect the java version based on the This application requires a Java Runtime Environment 11.0.1.ĭoes not matter if I select JRE, JDK or private jdk as launch4j setting. The command line we can see, openJDK and version 11.0.1.īut if I use the application converted as exe., I get the following error: We have set the JAVA_HOME variable and even when calling java-version from There is the option to reduce the size of such JREįirst of all, many thanks for your hard work on this tool.Īs you know, Oracle has changed their license policy and moe and more ofĪs openJDK comes with a zip file, without installed, it does not generate Larger but you don't have to worry about what java version is installed on Your best option is to bundle the JRE with the application, it'll make it Need to specify the java directory as absolute or relative path (bundledĬan you attach the log created by the executable with -l4j-debug option?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |