-
Notifications
You must be signed in to change notification settings - Fork 167
Support for a new syntax in JVMVersion field to specify both min and max Java version #51
Comments
It's not as easy to implement as I thought... Splitting the # read the Java version we want to find
JVMVersion=$(plist_get_java ':JVMVersion' | xargs)
if [[ ${JVMVersion} == *";"* ]]; then
minMaxArray=(${JVMVersion//;/ })
JVMVersion=$(echo ${minMaxArray[0]} | sed 's/+//')
JVMMaxVersion=$(echo ${minMaxArray[1]} | sed 's/+//')
stub_logger "[JavaRequirement] JVM minimum version: ${JVMVersion}"
stub_logger "[JavaRequirement] JVM maximum version: ${JVMMaxVersion}"
fi I already removed a trailing + as it would conflict with the min/max system. But then finding an installed Java version which is between min and max is hard. |
So I wrote this new piece of code over the past couple of days: Given a Look at the gist comments for examples. Should work quite well :) Integration on |
See issue #51 for examples how to use this feature
Solved with commit 02c2c24. Supported syntax is
|
For me running Java 17 with this results in a crash. I am not sure why. I did not check 12, 13, 14, 15, or 16 since they are not LTS releases. See [here][1] for info on the syntax for the version range. This will accept not only 11.0.x but also 11.x (not that they ever put anything besides 0 there nowadays). [1]: tofi86/universalJavaApplicationStub#51 (comment)
to specifiy minimal 1.7 and max 1.8 but not Java 9
e.g.
1.7+
for Java 7, 8, 91.7;1.8*
for Java 7, 81.8;9.0
for Java 8* up to exactly 9.0 (but not 9.0.*)1.8;9.0*
for Java 8* and 9.0.* but not 9.1.*The text was updated successfully, but these errors were encountered: