summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-17 01:15:13 +0200
committerSven Gothel <[email protected]>2014-06-17 01:15:13 +0200
commit56a22f2937c334320637557ef6cd9b38c4b03022 (patch)
treef83757cbd381e46c3604571885a059801fbc9d50
parentd3e2cd6432b3383d4589350d60170e02db469343 (diff)
Minor edits: space, final qualifier; setenv-build-*: Add generic JDK location
-rw-r--r--make/scripts/setenv-build-jogl-x86.sh12
-rw-r--r--make/scripts/setenv-build-jogl-x86_64.sh13
-rw-r--r--src/java/com/jogamp/common/os/DynamicLibraryBundle.java2
-rw-r--r--src/native/common/JVMUtil.c3
4 files changed, 28 insertions, 2 deletions
diff --git a/make/scripts/setenv-build-jogl-x86.sh b/make/scripts/setenv-build-jogl-x86.sh
index f035a4a..ce055ba 100644
--- a/make/scripts/setenv-build-jogl-x86.sh
+++ b/make/scripts/setenv-build-jogl-x86.sh
@@ -68,6 +68,18 @@ if [ -z "$FOUND_JAVA" ] ; then
fi
fi
+if [ -z "$FOUND_JAVA" ] ; then
+ # make a symbolic link, e.g. OpenJDK:
+ # /usr/lib/jvm/java-7-openjdk-i386 -> /usr/lib/jvm/java-i386
+ if [ -e /usr/lib/jvm/java-i386 ] ; then
+ J2RE_HOME=/usr/lib/jvm/java-i386/jre
+ JAVA_HOME=/usr/lib/jvm/java-i386
+ PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+ export J2RE_HOME JAVA_HOME
+ FOUND_JAVA=1
+ fi
+fi
+
export PATH
echo FOUND_JAVA $FOUND_JAVA
diff --git a/make/scripts/setenv-build-jogl-x86_64.sh b/make/scripts/setenv-build-jogl-x86_64.sh
index 8994365..a18bbe0 100644
--- a/make/scripts/setenv-build-jogl-x86_64.sh
+++ b/make/scripts/setenv-build-jogl-x86_64.sh
@@ -79,6 +79,19 @@ if [ -z "$FOUND_JAVA" ] ; then
fi
fi
+if [ -z "$FOUND_JAVA" ] ; then
+ # make a symbolic link, e.g. OpenJDK:
+ # /usr/lib/jvm/java-7-openjdk-amd64 -> /usr/lib/jvm/java-amd64
+ if [ -e /usr/lib/jvm/java-amd64 ] ; then
+ J2RE_HOME=/usr/lib/jvm/java-amd64/jre
+ JAVA_HOME=/usr/lib/jvm/java-amd64
+ PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+ export J2RE_HOME JAVA_HOME
+ FOUND_JAVA=1
+ fi
+fi
+
+
export PATH
echo FOUND_JAVA $FOUND_JAVA
diff --git a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
index 6ac8d94..4013203 100644
--- a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
+++ b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
@@ -74,7 +74,7 @@ public class DynamicLibraryBundle implements DynamicLookupHelper {
private long toolGetProcAddressHandle;
private boolean toolGetProcAddressComplete;
private HashSet<String> toolGetProcAddressFuncNameSet;
- private List<String> toolGetProcAddressFuncNameList;
+ private final List<String> toolGetProcAddressFuncNameList;
/** Returns an AWT-EDT {@link RunnableExecutor} implementation if AWT is available, otherwise {@link RunnableExecutor#currentThreadExecutor}. */
public static RunnableExecutor getDefaultRunnableExecutor() {
diff --git a/src/native/common/JVMUtil.c b/src/native/common/JVMUtil.c
index 28ef209..6df2aff 100644
--- a/src/native/common/JVMUtil.c
+++ b/src/native/common/JVMUtil.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2014 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -48,6 +49,6 @@ Java_jogamp_common_jvm_JVMUtil_initialize(JNIEnv *env, jclass _unused, jobject n
if (nioBuffer != NULL) {
ptr = (void *) (*env)->GetDirectBufferAddress(env, nioBuffer);
}
- return ( NULL==ptr ) ? JNI_FALSE : JNI_TRUE ;
+ return NULL != ptr ? JNI_TRUE : JNI_FALSE;
}