Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change -v to -V #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/osx/resources/universalJavaApplicationStub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ if [ $exitcode -eq 0 ]; then

# read the Java WorkingDirectory
JVMWorkDir=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:WorkingDirectory" "${InfoPlistFile}" 2> /dev/null | xargs`

# set Working Directory based upon Plist info
if [[ ! -z ${JVMWorkDir} ]]; then
WorkingDirectory="${JVMWorkDir}"
Expand Down Expand Up @@ -224,12 +224,12 @@ fi
# first check system variable "$JAVA_HOME"
if [ -n "$JAVA_HOME" ] ; then
JAVACMD="$JAVA_HOME/bin/java"

# check for specified JVMversion in "/usr/libexec/java_home" symlinks
elif [ ! -z ${JVMVersion} ] && [ -x /usr/libexec/java_home ] && /usr/libexec/java_home -F; then

if /usr/libexec/java_home -F -v ${JVMVersion}; then
JAVACMD="`/usr/libexec/java_home -F -v ${JVMVersion} 2> /dev/null`/bin/java"
if /usr/libexec/java_home -F -V ${JVMVersion}; then
JAVACMD="`/usr/libexec/java_home -F -V ${JVMVersion} 2> /dev/null`/bin/java"
else
# display error message with applescript
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)"
Expand Down