From 37ddcf83119bc97422df2dc24d67830ed1674858 Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 23 Dec 2018 22:03:21 +1300 Subject: AudioClip getAudioClip( URL url ) in org.jogamp.java3d.utils.applet.JMainFrame and org.jogamp.java3d.utils.appletMainFrame now throws unsupportedOperationException Java 11 no longer has the deprecated classes needed --- src/main/java/org/jogamp/java3d/utils/applet/JMainFrame.java | 4 +++- src/main/java/org/jogamp/java3d/utils/applet/MainFrame.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/org/jogamp/java3d/utils/applet/JMainFrame.java b/src/main/java/org/jogamp/java3d/utils/applet/JMainFrame.java index 80270d6..c79951e 100644 --- a/src/main/java/org/jogamp/java3d/utils/applet/JMainFrame.java +++ b/src/main/java/org/jogamp/java3d/utils/applet/JMainFrame.java @@ -308,7 +308,9 @@ public class JMainFrame extends JFrame // I suspect that in a future release, JavaSoft will add an // audio content handler which encapsulates this, and then // we can just do a getContent just like for images. - return new sun.applet.AppletAudioClip( url ); + // JDK 11 would use this: return com.sun.media.sound.JavaSoundAudioClip.create( url ); + // however that is not available prior to jdk 10, so it is better to simply un-support this method + throw new UnsupportedOperationException(); } @Override diff --git a/src/main/java/org/jogamp/java3d/utils/applet/MainFrame.java b/src/main/java/org/jogamp/java3d/utils/applet/MainFrame.java index 348b4e1..5a6a387 100644 --- a/src/main/java/org/jogamp/java3d/utils/applet/MainFrame.java +++ b/src/main/java/org/jogamp/java3d/utils/applet/MainFrame.java @@ -357,7 +357,9 @@ public class MainFrame extends Frame implements // I suspect that in a future release, JavaSoft will add an // audio content handler which encapsulates this, and then // we can just do a getContent just like for images. - return new sun.applet.AppletAudioClip( url ); + // JDK 11 would use this: return com.sun.media.sound.JavaSoundAudioClip.create( url ); + // however that is not available prior to jdk 10, so it is better to simply un-support this method + throw new UnsupportedOperationException(); } @Override -- cgit v1.2.3