我已經創建了JavaFX小程序。 (Mozilla,Chrome,IE) 也成功啓動在MacOS 10.6(Mozilla,Safari) 但是,當我嘗試在MacOS 10.5(在Mozilla或Safari中)啓動它時,拋出這樣的例外:JavaFX小程序問題
liveconnect: JSObject::call: name=fxAppletStarted
Exception in thread "AWT-EventQueue-8" java.lang.Error: Couldn't launch FX Stage FxInterface.Main
at com.sun.javafx.runtime.adapter.AppletStartupRoutineEx.run(Unknown Source)
at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:499)
at java.awt.EventQueue.access$000(EventQueue.java:80)
at java.awt.EventQueue$1.run(EventQueue.java:462)
at java.awt.EventQueue$1.run(EventQueue.java:461)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:84)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:471)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:173)
at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:145)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
at ProgramCore.JFXFacade.<init>(JFXFacade.java:28)
at FxInterface.Main$Main$Script.applyDefaults$(Main.fx:413)
at FxInterface.Main.javafx$run$(Main.fx:339)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
... 15 more
有沒有人知道,有什麼麻煩?
可能是OS X 10.6和10.5之間的Java版本的差異。我相信,10.5與Java 1.5和10.6是在Java 6.0 – 2011-03-14 17:00:55