aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-12-18 16:46:33 +0100
committerSven Gothel <[email protected]>2011-12-18 16:46:33 +0100
commit6b6d9f290242deabed6db03717d07f1889d17a8c (patch)
treea42b870866a3bb3ebf69c7b0017eb9e78a41174c
parent61573444bcd65feac6bb1a4589f507b9d10f2926 (diff)
Add TempJarCache usage
-rw-r--r--make/build-test.xml4
-rw-r--r--src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java34
2 files changed, 28 insertions, 10 deletions
diff --git a/make/build-test.xml b/make/build-test.xml
index 0aa5303..91a1d2d 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -98,11 +98,12 @@
<target name="test.auto.run" depends="junit.run"/>
<target name="junit.run" depends="test.compile">
- <junit forkmode="once" showoutput="true" fork="true" includeAntRuntime="true">
+ <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" includeAntRuntime="true">
<env key="${system.env.library.path}" path="${obj.all.paths}"/>
<jvmarg value="${jvmDataModel.arg}"/>
<jvmarg value="-Djava.library.path=${obj.all.paths}"/>
<!--
+ <jvmarg value="-Djogamp.debug=all"/>
<jvmarg value="-Djogamp.debug.NativeLibrary=true"/>
<jvmarg value="-Djogamp.debug.NativeLibrary.Lookup=true"/>
<jvmarg value="-Djogamp.debug.ProcAddressHelper=true"/> -->
@@ -153,6 +154,7 @@
<arg line="${jvmDataModel.arg}"/>
<arg value="-Djava.library.path=${obj.all.paths}"/>
<!--
+ <arg line="-Djogamp.debug=all"/>
<arg line="-Djogamp.debug.NativeLibrary=true"/>
<arg line="-Djogamp.debug.NativeLibrary.Lookup=true"/>
<arg line="-Djogamp.debug.ProcAddressHelper=true"/> -->
diff --git a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
index 3185f2b..e7791ba 100644
--- a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
+++ b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
@@ -28,14 +28,30 @@
package jogamp.openal;
+import com.jogamp.common.jvm.JNILibLoaderBase;
import com.jogamp.common.os.DynamicLibraryBundleInfo;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.cache.TempJarCache;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.*;
public class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
- private static List/*<String>*/ glueLibNames;
+ private static List<String> glueLibNames;
static {
- glueLibNames = new ArrayList();
-
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Platform.initSingleton();
+
+ if(TempJarCache.isInitialized()) {
+ JNILibLoaderBase.addNativeJarLibs(ALDynamicLibraryBundleInfo.class, "joal", null);
+ }
+ return null;
+ }
+ });
+
+ glueLibNames = new ArrayList<String>();
glueLibNames.add("joal");
}
@@ -48,14 +64,14 @@ public class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
/** default **/
public boolean shallLookupGlobal() { return false; }
- public final List/*<String>*/ getGlueLibNames() {
+ public final List<String> getGlueLibNames() {
return glueLibNames;
}
- public List getToolLibNames() {
- List/*<List>*/ libNamesList = new ArrayList();
+ public List<List<String>> getToolLibNames() {
+ List<List<String>> libNamesList = new ArrayList<List<String>>();
- List/*<String>*/ alLibNames = new ArrayList();
+ List<String> alLibNames = new ArrayList<String>();
// this is the default AL lib name, according to the spec
alLibNames.add("libopenal.so.1"); // unix
@@ -76,8 +92,8 @@ public class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
return libNamesList;
}
- public final List getToolGetProcAddressFuncNameList() {
- List res = new ArrayList();
+ public final List<String> getToolGetProcAddressFuncNameList() {
+ List<String> res = new ArrayList<String>();
res.add("alGetProcAddress");
return res;
}