• javafx:JavaFX Scene Builder 2.0打开含有第三方jar包的fxml文件报错 Caused by: java.lang.ClassNotFoundException


    报错如下:


    java.io.IOException: javafx.fxml.LoadException:
    /C:/User.................test.fxml

    at com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.load(FXOMLoader.java:92)
    at com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument.<init>(FXOMDocument.java:80)
    at com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument.<init>(FXOMDocument.java:95)
    at com.oracle.javafx.scenebuilder.kit.editor.EditorController.updateFxomDocument(EditorController.java:2370)
    at com.oracle.javafx.scenebuilder.kit.editor.EditorController.setFxmlTextAndLocation(EditorController.java:655)
    at com.oracle.javafx.scenebuilder.app.DocumentWindowController.loadFromFile(DocumentWindowController.java:386)
    at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performOpenFiles(SceneBuilderApp.java:579)
    at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.handleOpenFilesAction(SceneBuilderApp.java:447)
    at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.handleLaunch(SceneBuilderApp.java:427)
    at com.oracle.javafx.scenebuilder.app.AppPlatform.requestStartGeneric(AppPlatform.java:139)
    at com.oracle.javafx.scenebuilder.app.AppPlatform.requestStart(AppPlatform.java:106)
    at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.start(SceneBuilderApp.java:371)
    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.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
    at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
    at java.lang.Thread.run(Thread.java:744)
    Caused by: javafx.fxml.LoadException:
    /C:/User.................test.fxml

    at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2617)
    at javafx.fxml.FXMLLoader.importClass(FXMLLoader.java:2864)
    at javafx.fxml.FXMLLoader.processImport(FXMLLoader.java:2708)
    at javafx.fxml.FXMLLoader.processProcessingInstruction(FXMLLoader.java:2677)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2517)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2425)
    at com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.load(FXOMLoader.java:89)
    ... 22 more
    Caused by: java.lang.ClassNotFoundException: de...................(第三方的包文件)
    at java.lang.ClassLoader.findClass(ClassLoader.java:530)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at javafx.fxml.FXMLLoader.loadTypeForPackage(FXMLLoader.java:2932)
    at javafx.fxml.FXMLLoader.loadType(FXMLLoader.java:2921)
    at javafx.fxml.FXMLLoader.importClass(FXMLLoader.java:2862)
    ... 27 more


    把第三方jar包放进JavaFX Scene Builder 2.0安装目录下如图,在package.cfg文件中app.classpath=行添加第三方的jar包

  • 相关阅读:
    3.2单变量分析 proc univariate
    method of walking——地点定桩法
    韩语陈述句末尾词语法
    数据挖掘简述
    MERGE语句——数据集横向合并
    【转】JavaScript中一个方法同时发送两个ajax请求问题
    ASP.NET MVC中controller和view相互传值的方式
    【转】007.ASP.NET MVC控制器依赖注入
    【转】MVC之 自定义过滤器(ActionFilterAttribute)
    【转】【ASP.NET MVC系列】浅谈ASP.NET 页面之间传值的几种方式
  • 原文地址:https://www.cnblogs.com/tk55/p/9865268.html
Copyright © 2020-2023  润新知