summaryrefslogtreecommitdiffstats
path: root/src/classes
diff options
context:
space:
mode:
authorKevin Rushforth <[email protected]>2004-11-01 19:21:31 +0000
committerKevin Rushforth <[email protected]>2004-11-01 19:21:31 +0000
commita0154c99b208bfb73a13190d50ecccf331ce5c3c (patch)
tree6a88b696ebbd7310aaa7d29df2d44d398e85628e /src/classes
parent36b981685cc1633e24c4622399b95428d89df002 (diff)
Use System ClassLoader for loading audio engine when j3d.audioengine
property is specified git-svn-id: https://svn.java.net/svn/j3d-core-utils~svn/trunk@27 9497e636-51bd-65ba-982d-a4982e1767a5
Diffstat (limited to 'src/classes')
-rw-r--r--src/classes/share/com/sun/j3d/utils/universe/Viewer.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/classes/share/com/sun/j3d/utils/universe/Viewer.java b/src/classes/share/com/sun/j3d/utils/universe/Viewer.java
index 207ce08..fa631fc 100644
--- a/src/classes/share/com/sun/j3d/utils/universe/Viewer.java
+++ b/src/classes/share/com/sun/j3d/utils/universe/Viewer.java
@@ -979,7 +979,20 @@ public class Viewer {
throw new UnsupportedOperationException("No AudioDevice specified");
}
- Class audioDeviceClass = Class.forName(audioDeviceClassName);
+ ClassLoader audioDeviceClassLoader =
+ (ClassLoader) java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ return ClassLoader.getSystemClassLoader();
+ }
+ });
+
+ if (audioDeviceClassLoader == null) {
+ throw new IllegalStateException("System ClassLoader is null");
+ }
+
+ Class audioDeviceClass =
+ Class.forName(audioDeviceClassName, true, audioDeviceClassLoader);
Class physEnvClass = PhysicalEnvironment.class;
Constructor audioDeviceConstructor =
audioDeviceClass.getConstructor(new Class[] {physEnvClass});