我如何运行VFXWindows示例项目?

时间:2014-12-07 13:21:48

标签: javafx jfxtras

我正在尝试创建一个JavaFX MDI应用程序。在JFXPanel上使用FXML文件然后在JInternalFrame上给弹出组件提供了很多问题,如菜单和ComboBox

现在我正在尝试使用jfxtras的VFXWindow。 我选了其中一个VFXWindow Samples。我对所有样品都有例外。我如何让它运行?

Exception in Application start method
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/scene/control/skin/SkinBase
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at javafx.scene.control.Control.loadClass(Control.java:111)
    at javafx.scene.control.Control.loadSkinClass(Control.java:697)
    at javafx.scene.control.Control$5.invalidated(Control.java:657)
    at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:109)
    at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:143)
    at javafx.css.StyleableStringProperty.set(StyleableStringProperty.java:83)
    at javafx.scene.control.Control$5.set(Control.java:649)
    at javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:69)
    at javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:45)
    at javafx.scene.CssStyleHelper.transitionToState(CssStyleHelper.java:786)
    at javafx.scene.Node.impl_processCSS(Node.java:8889)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1250)
    at javafx.scene.control.Control.impl_processCSS(Control.java:872)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1281)
    at javafx.scene.Node.impl_processCSS(Node.java:8869)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1250)
    at javafx.scene.control.Control.impl_processCSS(Control.java:872)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1281)
    at javafx.scene.Node.processCSS(Node.java:8732)
    at javafx.scene.Scene.doCSSPass(Scene.java:569)
    at javafx.scene.Scene.preferredSize(Scene.java:1576)
    at javafx.scene.Scene.impl_preferredSize(Scene.java:1653)
    at javafx.stage.Window$9.invalidated(Window.java:750)
    at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
    at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:143)
    at javafx.stage.Window.setShowing(Window.java:826)
    at javafx.stage.Window.show(Window.java:841)
    at javafx.stage.Stage.show(Stage.java:250)
    at tutorial.VFXWindowsTutorial1.start(VFXWindowsTutorial1.java:45)
    at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
    at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.access$200(GtkApplication.java:48)
    at com.sun.glass.ui.gtk.GtkApplication$6$1.run(GtkApplication.java:149)
    ... 1 more
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.scene.control.skin.SkinBase
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 52 more
Exception running application tutorial.VFXWindowsTutorial1
Java Result: 1

1 个答案:

答案 0 :(得分:0)

您似乎在Java(FX)8环境中使用JFXtras 2.x版本。 Oracle已经从JavaFX 2移动了一些类 - > 8,所以你需要使用JFXtras 8.x版本。

那就是说,我不确定VFXWindows是否被开发人员迁移到JavaFX 8,实际上我在当前的源代码树中找不到VFXWindowsTutorial1类。然而,jfxtras-windows工件...... http://jfxtras.org/