Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8165877

MediaView: NoClassDefFoundError when trying to use reflection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 9
    • javafx

      Please try:

      public class MediaTest {
          
          public static void main(String[] args) throws Exception {
              Class.forName("javafx.scene.media.MediaView").getDeclaredMethod("setViewport", javafx.geometry.Rectangle2D.class);
          }
      }

      =>

      Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/media/jfxmediaimpl/platform/ios/IOSMediaPlayer
      at java.lang.Class.getDeclaredMethods0(java.base@9-ea/Native Method)
      at java.lang.Class.privateGetDeclaredMethods(java.base@9-ea/Class.java:2952)
      at java.lang.Class.getDeclaredMethod(java.base@9-ea/Class.java:2320)
      at MediaTest.main(MediaTest.java:6)
      Caused by: java.lang.ClassNotFoundException: com.sun.media.jfxmediaimpl.platform.ios.IOSMediaPlayer
      at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-ea/BuiltinClassLoader.java:366)
      at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:419)
      ... 4 more

      OS: Windows 7, Ubuntu 16.04 Linux. JDK9 b133

      regression: no such issue for JDK 8. (jigsaw-related issue?)

            kcr Kevin Rushforth
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: