From c6e8dece2de038fd7ef5fbc37f639414d42e7293 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 9 Nov 2010 18:23:20 +0300 Subject: [PATCH] Exit application startup scripts if no JDK was found (Unix) --- bin/nix/idea.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/nix/idea.sh b/bin/nix/idea.sh index 6b19f0819c4e..cf3b52de4e7e 100755 --- a/bin/nix/idea.sh +++ b/bin/nix/idea.sh @@ -26,7 +26,11 @@ if [ -z "$IDEA_JDK" ]; then fi if [ -z "$IDEA_JDK" ]; then echo ERROR: cannot start IntelliJ IDEA. - echo No JDK found to run IDEA. Please validate either IDEA_JDK or JDK_HOME points to valid JDK installation + echo No JDK found to run IDEA. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation. + echo + echo Press Enter to continue. + read IGNORE + exit 1 fi fi @@ -36,7 +40,7 @@ grep 'OpenJDK' $VERSION_LOG OPEN_JDK=$? grep '64-Bit' $VERSION_LOG BITS=$? -rm /tmp/java.version.log +rm $VERSION_LOG if [ $OPEN_JDK -eq 0 ]; then echo WARNING: You are launching IDE using OpenJDK Java runtime echo