4 Replies Latest reply: Nov 29, 2012 5:28 AM by 976466 RSS

    JavaFX 2.2.3 on Mac OS X 10.7.5 (Lion)

    976466
      Hello!

      I just installed Oracle jdk-7u9-macosx-x64.dmg on my Mac and tried to run the JARs from javafx_samples-2_2_3-macosx-universal.zip.

      But, if I try to

      java -jar javafx-samples-2.2.3/Ensemble.jar

      from the console, I only get the following output

      java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.javafx.main.Main.launchApp(Main.java:642)
           at com.javafx.main.Main.main(Main.java:805)
      Caused by: java.lang.UnsupportedOperationException: Unknown is not supported
           at com.sun.javafx.tk.Toolkit.getDefaultToolkit(Toolkit.java:139)
           at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:194)
           at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:120)
           at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:163)
           at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
           at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
           at java.lang.Thread.run(Thread.java:722)
      java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.javafx.main.Main.errorExit(Main.java:893)
           at com.javafx.main.Main.launchApp(Main.java:645)
           at com.javafx.main.Main.main(Main.java:805)
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
           at java.awt.EventQueue.isDispatchThread(EventQueue.java:1003)
           at java.awt.EventQueue.invokeAndWait(EventQueue.java:1238)
           at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1349)
           ... 7 more

      As I removed all other installed Java versions (even the one which came from apple while the Lion still was a Snow Leopard), I'm quite certain, that only the freshly installed JDK can be used

      java -version

      yields

      java version "1.7.0_09"
      Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
      Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

      Does anybody have any idea why JavaFX does not run on my machine?

      Thanks in advance for your effort!

      kind regards,

      Andreas Rozek