Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 71f9802

Browse files
committed
special semicolon syntax in JVMVersion key to specify a max JVM requirement
refs #51
1 parent 7202a38 commit 71f9802

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/universalJavaApplicationStub

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# #
1212
# @author Tobias Fischer #
1313
# @url https://github.com/tofi86/universalJavaApplicationStub #
14-
# @date 2018-01-07 #
14+
# @date 2018-02-11 #
1515
# @version 2.1.0 #
1616
# #
1717
##################################################################################
@@ -106,6 +106,7 @@ InfoPlistFile="${AppPackageFolder}"/Contents/Info.plist
106106

107107
# set the default JVM Version to a null string
108108
JVMVersion=""
109+
JVMMaxVersion=""
109110

110111

111112

@@ -225,6 +226,13 @@ if [ $exitcode -eq 0 ]; then
225226

226227
# read the Java version we want to find
227228
JVMVersion=$(plist_get_java ':JVMVersion' | xargs)
229+
if [[ ${JVMVersion} == *";"* ]]; then
230+
minMaxArray=(${JVMVersion//;/ })
231+
JVMVersion=$(echo ${minMaxArray[0]} | sed 's/+//')
232+
JVMMaxVersion=$(echo ${minMaxArray[1]} | sed 's/+//')
233+
stub_logger "[JavaRequirement] JVM minimum version: ${JVMVersion}"
234+
stub_logger "[JavaRequirement] JVM maximum version: ${JVMMaxVersion}"
235+
fi
228236

229237

230238
# read 'Info.plist' file in Oracle style

0 commit comments

Comments
 (0)