Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rwxr-xr-xfeatures/org.eclipse.equinox.executable.feature/library/gtk/build.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/build.sh b/features/org.eclipse.equinox.executable.feature/library/gtk/build.sh
index 6cd9ca86e..691eb40ae 100755
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/build.sh
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/build.sh
@@ -86,6 +86,17 @@ case $defaultOS in
defaultOSArch="x86_64"
defaultJava=DEFAULT_JAVA_EXEC
[ -d /bluebird/teamswt/swt-builddir/JDKs/x86_64/jdk1.5.0 ] && defaultJavaHome="/bluebird/teamswt/swt-builddir/JDKs/x86_64/jdk1.5.0"
+
+ # Automatically figure out where java is installed on the system if it was not found/given otherwise.
+ if [ "$defaultJavaHome" = "" ]; then
+ DYNAMIC_JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/::" | sed "s:bin/java::"`
+ if [ -a "${DYNAMIC_JAVA_HOME}include/jni.h" ]; then
+ echo "Info: Java automatically set to: $DYNAMIC_JAVA_HOME "
+ defaultJavaHome="$DYNAMIC_JAVA_HOME"
+ else
+ echo "Warning, java not found on system. Please specify JAVA_HOME manually"
+ fi
+ fi
OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
;;
i?86 | "x86")

Back to the top