当前位置: 首页 > 知识库问答 >
问题:

胶子场景构建器不会启动

储国发
2023-03-14

我最近安装了Scene Builder,特别是.jar。我正试图发射它,但没有任何成功。我的操作系统是OS X El Capitan版本10.11.4。我的Java版本是8,更新92。

首先,我选择双击.Jar文件(Jar Launcher版本为15.0.1),该文件将打印出该消息。

28/04/16 12:11:14,468 com.apple.xpc.launchd[1]: 
(com.oracle.javafx.scenebuilder.app.291552[4267]) Service exited with abnormal code: 1
java -jar SceneBuilder-8.1.1.jar 

打印出以下消息

Exception in Application start method
Apr 28, 2016 11:18:40 AM     com.oracle.javafx.scenebuilder.app.SceneBuilderApp$SceneBuilderUncaughtExceptionHandler uncaughtException
SEVERE: An exception was thrown:
java.lang.NullPointerException
    at com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:99)
    at com.sun.javafx.font.PrismFontFactory.getFullNameToFileMap(PrismFontFactory.java:1740)
    at com.sun.javafx.font.PrismFontFactory.getFontResource(PrismFontFactory.java:469)
    at com.sun.javafx.font.LogicalFont.getSlot0Resource(LogicalFont.java:194)
    at com.sun.javafx.font.LogicalFont.getDefaultAAMode(LogicalFont.java:409)
    at com.sun.javafx.font.LogicalFont.getStrike(LogicalFont.java:413)
    at com.sun.javafx.font.PrismFont.getStrike(PrismFont.java:73)
    at com.sun.javafx.text.PrismTextLayout.setContent(PrismTextLayout.java:138)
    at javafx.scene.text.Text.getTextLayout(Text.java:229)
    at javafx.scene.text.Text.needsFullTextLayout(Text.java:184)
    at javafx.scene.text.Text.access$200(Text.java:95)
    at javafx.scene.text.Text$5.invalidated(Text.java:501)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:111)
    at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
    at javafx.css.StyleableObjectProperty.set(StyleableObjectProperty.java:82)
    at javafx.scene.text.Text.setFont(Text.java:474)
    at com.sun.javafx.scene.control.skin.LabeledText.<init>(LabeledText.java:72)
    at com.sun.javafx.scene.control.skin.LabeledSkinBase.<init>(LabeledSkinBase.java:125)
    at com.sun.javafx.scene.control.skin.LabelSkin.<init>(LabelSkin.java:39)
    at javafx.scene.control.Label.createDefaultSkin(Label.java:158)
    at javafx.scene.control.Control.impl_processCSS(Control.java:872)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.control.Control.impl_processCSS(Control.java:875)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Node.processCSS(Node.java:9056)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Scene.doCSSPass(Scene.java:545)
    at javafx.scene.Scene.access$3600(Scene.java:159)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2392)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:381)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Apr 28, 2016 11:18:40 AM com.oracle.javafx.scenebuilder.app.SceneBuilderApp$SceneBuilderUncaughtExceptionHandler uncaughtException
SEVERE: An exception was thrown:
java.lang.NullPointerException
    at com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:99)
    at com.sun.javafx.font.PrismFontFactory.getFullNameToFileMap(PrismFontFactory.java:1740)
    at com.sun.javafx.font.PrismFontFactory.getFontResource(PrismFontFactory.java:469)
    at com.sun.javafx.font.LogicalFont.getSlot0Resource(LogicalFont.java:194)
    at com.sun.javafx.font.LogicalFont.getDefaultAAMode(LogicalFont.java:409)
    at com.sun.javafx.font.LogicalFont.getStrike(LogicalFont.java:413)
    at com.sun.javafx.font.PrismFont.getStrike(PrismFont.java:73)
    at com.sun.javafx.text.PrismTextLayout.setContent(PrismTextLayout.java:138)
    at javafx.scene.text.Text.getTextLayout(Text.java:229)
    at javafx.scene.text.Text.needsFullTextLayout(Text.java:184)
    at javafx.scene.text.Text.access$200(Text.java:95)
    at javafx.scene.text.Text$5.invalidated(Text.java:501)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:111)
    at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
    at javafx.css.StyleableObjectProperty.set(StyleableObjectProperty.java:82)
    at javafx.scene.text.Text.setFont(Text.java:474)
    at com.sun.javafx.scene.control.skin.LabeledText.<init>(LabeledText.java:72)
    at com.sun.javafx.scene.control.skin.LabeledSkinBase.<init>(LabeledSkinBase.java:125)
    at com.sun.javafx.scene.control.skin.LabelSkin.<init>(LabelSkin.java:39)
    at javafx.scene.control.Label.createDefaultSkin(Label.java:158)
    at javafx.scene.control.Control.impl_processCSS(Control.java:872)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Node.processCSS(Node.java:9056)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Node.processCSS(Node.java:9049)
    at javafx.scene.Scene.doCSSPass(Scene.java:545)
    at javafx.scene.Scene.access$3600(Scene.java:159)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2392)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:381)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

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:498)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    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:498)
    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:917)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:99)
    at com.sun.javafx.font.PrismFontFactory.getFullNameToFileMap(PrismFontFactory.java:1740)
    at com.sun.javafx.font.PrismFontFactory.getFontResource(PrismFontFactory.java:469)
    at com.sun.javafx.font.LogicalFont.getSlot0Resource(LogicalFont.java:194)
    at com.sun.javafx.font.LogicalFont.getDefaultAAMode(LogicalFont.java:409)
    at com.sun.javafx.font.LogicalFont.getStrike(LogicalFont.java:413)
    at com.sun.javafx.font.PrismFont.getStrike(PrismFont.java:73)
    at com.sun.javafx.text.PrismTextLayout.setContent(PrismTextLayout.java:138)
    at javafx.scene.text.Text.getTextLayout(Text.java:229)
    at javafx.scene.text.Text.needsFullTextLayout(Text.java:184)
    at javafx.scene.text.Text.access$200(Text.java:95)
    at javafx.scene.text.Text$5.invalidated(Text.java:501)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:111)
    at javafx.beans.property.ObjectPropertyBase.bind(ObjectPropertyBase.java:174)
    at javafx.css.StyleableObjectProperty.bind(StyleableObjectProperty.java:75)
    at com.sun.javafx.scene.control.skin.LabeledText.<init>(LabeledText.java:82)
    at com.sun.javafx.scene.control.skin.LabeledSkinBase.<init>(LabeledSkinBase.java:125)
    at com.sun.javafx.scene.control.skin.LabelSkin.<init>(LabelSkin.java:39)
    at javafx.scene.control.Label.createDefaultSkin(Label.java:158)
    at javafx.scene.control.Control.impl_processCSS(Control.java:872)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.control.Control.impl_processCSS(Control.java:875)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.control.Control.impl_processCSS(Control.java:875)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.control.Control.impl_processCSS(Control.java:875)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
    at javafx.scene.Node.processCSS(Node.java:9056)
    at javafx.scene.Scene.doCSSPass(Scene.java:545)
    at javafx.scene.Scene.preferredSize(Scene.java:1643)
    at javafx.scene.Scene.impl_preferredSize(Scene.java:1720)
    at javafx.stage.Window$9.invalidated(Window.java:846)
    at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
    at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
    at javafx.stage.Window.setShowing(Window.java:922)
    at javafx.stage.Window.show(Window.java:937)
    at javafx.stage.Stage.show(Stage.java:259)
    at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractWindowController.openWindow(AbstractWindowController.java:148)
    at com.oracle.javafx.scenebuilder.app.DocumentWindowController.openWindow(DocumentWindowController.java:1097)
    at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.handleLaunch(SceneBuilderApp.java:394)
    at com.oracle.javafx.scenebuilder.app.AppPlatform.requestStartMac(AppPlatform.java:207)
    at com.oracle.javafx.scenebuilder.app.AppPlatform.requestStart(AppPlatform.java:99)
    at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.start(SceneBuilderApp.java:353)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Exception running application com.oracle.javafx.scenebuilder.app.SceneBuilderApp

共有1个答案

平庆
2023-03-14

问题似乎出在MacFontFinder上,因此我打开了Font Book并转到File>Restore Standard Fonts。现在启动场景构建器没有任何问题。

 类似资料:
  • 我正在配置我的表单的样式,我想改变它的背景颜色,在JavaFX CSS部分有2个textfield;一个用于标记(例如-FX-border-color),另一个是其中的值。每次输入第一个textfield后,我开始切换到值textfield,但场景构建器突然冻结。我在任务管理器上检查了它,但我发现它不消耗cpu,它的实例还在那里。会有什么问题?

  • 在ubuntu上,我安装了scene builder,但它不会启动。也没有给出任何类型的异常。图标闪烁几秒钟,然后停止。

  • 第一个问题:由于将集成到容器(BorderPane)中,它本身不需要容器。但是SceneBuilder只提供了将布局创建为容器的选项? 第二个问题:我可以手动创建,然后手动修改以包括。然后,我可以使用SceneBuilder毫无问题地加载borderpane.fxml文件。但是,当我现在更改标签的文本并选择“保存”时,修改的不是,而是如下所示: 新标签文本应该写入,而不是写入。 我想为我的GUI的

  • 我使用的是JavaFX Scene Builder2.0。版本,我想在TabPane控制器下导入一个FXML文件。我的想法是,我将拥有一种包含TabPane的容器FXML文件,并为选项卡中的内容创建单独的FXML文件。当我尝试导入FXML文件时,我想在其中添加的内容在一个选项卡下,场景构建器给出错误消息“Failed to import tabcontents.FXML under TabPane

  • This section will explain the core elements you will work with to build scenes for complete games. 本节将讲解的核心元素,将建立完整的游戏场景。 GameObjects 游戏对象 The GameObject-Component Relationship 游戏对象和组件的关系 Using Compon

  • 问题内容: 大家好,我正在构建一个JavaFX项目并正在使用JavaFX Scene Builder2。我想将控制器链接到我的fxml文件,但是我看不到在Scene Builder 2中将控制器添加到我的fxml文件的可能性。我想知道是否有人可以帮助我。谢谢。 问题答案: 我偶然在SceneBuilder 2中找到了控制器属性。关闭左侧的层次结构菜单时,将显示“控制器”菜单,可以在其中声明我的控制