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

Commit 0ff59b3

Browse files
committed
Merge pull request #20 from Fedict/master
Reorder search for Java VM locations when specific JVM version is required
2 parents 2071daa + be8a3b2 commit 0ff59b3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/universalJavaApplicationStub

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,15 @@ elif [ ! -z ${JVMVersion} ] ; then
310310
# first in "/usr/libexec/java_home" symlinks
311311
if [ -x /usr/libexec/java_home ] && /usr/libexec/java_home -F -v ${JVMVersion} > /dev/null ; then
312312
JAVACMD="`/usr/libexec/java_home -F -v ${JVMVersion} 2> /dev/null`/bin/java"
313-
314-
# then in Apple JRE plugin
315-
elif [ -x "${apple_jre_plugin}" ] && JavaVersionSatisfiesRequirement ${apple_jre_version} ${JVMVersion} ; then
316-
JAVACMD="${apple_jre_plugin}"
317-
313+
318314
# then in Oracle JRE plugin
319315
elif [ -x "${oracle_jre_plugin}" ] && JavaVersionSatisfiesRequirement ${oracle_jre_version} ${JVMVersion} ; then
320316
JAVACMD="${oracle_jre_plugin}"
321-
317+
318+
# then in Apple JRE plugin
319+
elif [ -x "${apple_jre_plugin}" ] && JavaVersionSatisfiesRequirement ${apple_jre_version} ${JVMVersion} ; then
320+
JAVACMD="${apple_jre_plugin}"
321+
322322
else
323323
# display error message with applescript
324324
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'\n\nNo suitable Java version found on your system!\nThis program requires Java ${JVMVersion}\nMake sure you install the required Java version.\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"

0 commit comments

Comments
 (0)