aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-06-17 04:08:24 +0200
committerSven Gothel <[email protected]>2019-06-17 04:08:24 +0200
commit330dad069dee5a0cc0480cf5cd9052000004223a (patch)
tree97593f5e7586c3aa12055c37cd0ac5d829488827 /src/java/com/jogamp/common/os
parent52a6d4ef4133a998824236af9bb48d0ea65359a9 (diff)
Bug 1363: Java 11: Recognize Java9+ ..; Support JEP 178 static linkage libgluegen-rt[.so] -> libgluegen_rt[.so|.a]
Recognize Java9+ .. - Recognize new Java9+ version string as of JEP 223 - Avoid Classpath's private findLibrary call +++ Support JEP 178 static linkage (OpenJDK 1.8) - Need to change native library basename: libgluegen-rt[.so] -> libgluegen_rt[.so|.a] since the dash '-' is not supported in a ANSI-c function name. - Added 'JNI_OnLoad_gluegen_rt' to recognize statical linked JNI code - Added JNI_VERSION_1_8 to jni/jni.h
Diffstat (limited to 'src/java/com/jogamp/common/os')
-rw-r--r--src/java/com/jogamp/common/os/NativeLibrary.java3
-rw-r--r--src/java/com/jogamp/common/os/Platform.java7
2 files changed, 8 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/os/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java
index 6daceae..39d1475 100644
--- a/src/java/com/jogamp/common/os/NativeLibrary.java
+++ b/src/java/com/jogamp/common/os/NativeLibrary.java
@@ -604,6 +604,9 @@ public final class NativeLibrary implements DynamicLookupHelper {
private static boolean initializedFindLibraryMethod = false;
private static Method findLibraryMethod = null;
private static final String findLibraryImpl(final String libName, final ClassLoader loader) {
+ if( PlatformPropsImpl.JAVA_9 ) {
+ return null;
+ }
if (loader == null) {
return null;
}
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index f995af3..1bd3b9d 100644
--- a/src/java/com/jogamp/common/os/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -255,8 +255,11 @@ public class Platform extends PlatformPropsImpl {
private static final String useTempJarCachePropName = "jogamp.gluegen.UseTempJarCache";
- /** fixed basename of JAR file and native library */
- private static final String libBaseName = "gluegen-rt";
+ /**
+ * Fixed basename of JAR file and native library.
+ * Dash replaced by underscore to allow static linkage via JEP 178.
+ */
+ private static final String libBaseName = "gluegen_rt";
//
// static initialization order: