Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2017-12-18 18:25:14 -0500
committerAlexander Kurtakov2018-01-03 06:57:19 -0500
commitb88262a440d71cc2bea6b8620fdd46a7de7b7b97 (patch)
tree32e2341986975c80fa774d06eb2f2d8a035f1c6e
parent877ace5eb249d048c47b271fe4b055c2e2d818e8 (diff)
downloadrt.equinox.framework-b88262a440d71cc2bea6b8620fdd46a7de7b7b97.tar.gz
rt.equinox.framework-b88262a440d71cc2bea6b8620fdd46a7de7b7b97.tar.xz
rt.equinox.framework-b88262a440d71cc2bea6b8620fdd46a7de7b7b97.zip
specified. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=528926 Change-Id: I23e3d9d7aed0ea7702329e7e705120539420f5dc Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
-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