summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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});