JDK-8165877 : MediaView: NoClassDefFoundError when trying to use reflection
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-09-12
  • Updated: 2016-09-14
  • Resolved: 2016-09-12
Related Reports
Duplicate :  
Description
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?)
Comments
yes, thanks. no issue with b135
12-09-2016

The fix for JDK-8160988 is in jdk-9+135
12-09-2016

Duplicate of JDK-8160988
12-09-2016