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

Commit 2071daa

Browse files
committed
Improved display error message with applescript // refs #22
Thanks to @ygesnel for his initial contribution in PR #22
1 parent e32e2de commit 2071daa

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/universalJavaApplicationStub

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,9 @@ elif [ -f "$JAVACMD" ] && [ -x "$JAVACMD" ] ; then
388388
else
389389

390390
# display error message with applescript
391-
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'!\n\nYou need to have JAVA installed on your Mac!\nVisit http://java.com for more information...\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
392-
393-
# and open java.com
394-
open http://java.com
391+
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'!\n\nYou need to have JAVA installed on your Mac!\nVisit java.com for installation instructions...\" with title \"${CFBundleName}\" buttons {\"Later\", \"Visit java.com\"} default button \"Visit java.com\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
392+
-e "set response to button returned of the result" \
393+
-e "if response is \"Visit java.com\" then open location \"http://java.com\""
395394

396395
# exit with error
397396
exit 1

0 commit comments

Comments
 (0)