|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Classes | |
| interface | LoaderAction |
Static Public Member Functions | |
| static boolean | isLoaded (final String libName) |
| static void | addLoaded (final String libName) |
| static void | disableLoading () |
| static void | enableLoading () |
| static synchronized void | setLoadingAction (final LoaderAction action) |
| static final boolean | addNativeJarLibsJoglCfg (final Class<?>[] classesFromJavaJars) |
Loads and adds a JAR file's native library to the TempJarCache, calling JNILibLoaderBase#addNativeJarLibs(Class[], String) with default JOGL deployment configuration: More... | |
| static boolean | addNativeJarLibs (final Class<?>[] classesFromJavaJars, final String singleJarMarker) |
| Loads and adds a JAR file's native library to the TempJarCache. More... | |
Static Public Attributes | |
| static final boolean | DEBUG |
Static Protected Member Functions | |
| static synchronized boolean | loadLibrary (final String libname, final boolean ignoreError, final ClassLoader cl) |
Loads the library specified by libname, using the LoaderAction set by setLoadingAction(LoaderAction). More... | |
| static synchronized void | loadLibrary (final String libname, final String[] preload, final boolean preloadIgnoreError, final ClassLoader cl) |
Loads the library specified by libname, using the LoaderAction set by setLoadingAction(LoaderAction). More... | |
Static Protected Attributes | |
| static final boolean | PERF |
Definition at line 64 of file JNILibLoaderBase.java.
|
static |
Definition at line 145 of file JNILibLoaderBase.java.
|
static |
Loads and adds a JAR file's native library to the TempJarCache.
The native library JAR file's URI is derived as follows:
GLProfile.class -> http://lala/gluegen-rt.jar -> http://lala/gluegen-rt -> http://lala/gluegen-rt-natives-'os.and.arch'.jar Where:
classesFromJavaJars Generic description:
final Class<?>[] classesFromJavaJars = new Class<?>[] { Class1.class, Class2.class };
JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all");
If Class1.class is contained in a JAR file which name includes singleJarMarker, here -all, implementation will attempt to resolve the native JAR file as follows:
Otherwise the native JAR files will be resolved for each class's JAR file:
Examples:
JOCL:
// only: jocl.jar -> jocl-natives-os.and.arch.jar
addNativeJarLibs(new Class<?>[] { JOCLJNILibLoader.class }, null, null );
JOGL:
final ClassLoader cl = GLProfile.class.getClassLoader();
// jogl-all.jar -> jogl-all-natives-os.and.arch.jar
// jogl-all-noawt.jar -> jogl-all-noawt-natives-os.and.arch.jar
// jogl-all-mobile.jar -> jogl-all-mobile-natives-os.and.arch.jar
// jogl-all-android.jar -> jogl-all-android-natives-os.and.arch.jar
// nativewindow.jar -> nativewindow-natives-os.and.arch.jar
// jogl.jar -> jogl-natives-os.and.arch.jar
// newt.jar -> newt-natives-os.and.arch.jar (if available)
final String newtFactoryClassName = "com.jogamp.newt.NewtFactory";
final Class<?>[] classesFromJavaJars = new Class<?>[] { NWJNILibLoader.class, GLProfile.class, null };
if( ReflectionUtil.isClassAvailable(newtFactoryClassName, cl) ) {
classesFromJavaJars[2] = ReflectionUtil.getClass(newtFactoryClassName, false, cl);
}
JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all");
| classesFromJavaJars | For each given Class, load the native library JAR. |
| singleJarMarker | Optional string marker like "-all" to identify the single 'all-in-one' JAR file after which processing of the class array shall stop. |
Definition at line 397 of file JNILibLoaderBase.java.
|
static |
Loads and adds a JAR file's native library to the TempJarCache, calling JNILibLoaderBase#addNativeJarLibs(Class[], String) with default JOGL deployment configuration:
return JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all");
If Class1.class is contained in a JAR file which name includes singleJarMarker -all, implementation will attempt to resolve the native JAR file as follows:
Otherwise the native JAR files will be resolved for each class's JAR file:
Definition at line 323 of file JNILibLoaderBase.java.
|
static |
|
static |
|
static |
Definition at line 141 of file JNILibLoaderBase.java.
|
staticprotected |
Loads the library specified by libname, using the LoaderAction set by setLoadingAction(LoaderAction).
The implementation should ignore, if the library has been loaded already.
| libname | the library to load |
| ignoreError | if true, errors during loading the library should be ignored |
| cl | optional ClassLoader, used to locate the library |
Definition at line 486 of file JNILibLoaderBase.java.
|
staticprotected |
Loads the library specified by libname, using the LoaderAction set by setLoadingAction(LoaderAction).
Optionally preloads the libraries specified by preload.
The implementation should ignore, if any library has been loaded already.
| libname | the library to load |
| preload | the libraries to load before loading the main library if not null |
| preloadIgnoreError | if true, errors during loading the preload-libraries should be ignored |
| cl | optional ClassLoader, used to locate the library |
Definition at line 502 of file JNILibLoaderBase.java.
|
static |
|
static |
Definition at line 65 of file JNILibLoaderBase.java.
|
staticprotected |
Definition at line 66 of file JNILibLoaderBase.java.