所以我第一次安装了Intellij,并错误地将SceneBuilder's快捷链接与FXML
文件相关联,并不断收到此错误:IntelliJ failed to start scene builder
。经过大量的搜索后,我找不到如何重置SceneBuilder。如何在IntelliJ中重置SceneBuilder?
答案 0 :(得分:3)
转到Settings > Languages & Frameworks > JavaFX > Path to SceneBuilder
并选择JavaFX Scene Builder 2.0.exe
答案 1 :(得分:2)
我必须按照此说明查找我需要编辑的文件。 - > Instructions
我使用的是Windows 10,因此我使用了<SYSTEM DRIVE>\Users\<USER ACCOUNT NAME>\.<PRODUCT><VERSION>
。我的路径看起来像C:\Users\yourUserName\.IdeaIC2017.3\config
。接下来,我搜索了“scenebulder”。结果将我引导到一个名为“options”的文件和一个名为“other”的文件。
other.xml
<application>
<component name="JavaFxSettings">
<!-- change here --><option name="pathToSceneBuilder" value="$USER_HOME$/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Gluon/SceneBuilder.lnk" />
<!-- change here --><option name="myPathToSceneBuilder" value="$USER_HOME$/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Gluon/SceneBuilder.lnk" />
</component>
</application>
options.xml
<application>
<component name="PropertiesComponent">
<property name="Default.savedEditorTheme" value="_@user_Default" />
<property name="installed.kotlin.plugin.version" value="1.2.10-release-IJ2017.3-1" />
<property name="project.wizard.group" value="JavaFX Application" />
<property name="project.wizard.template" value="JavaFX Application" />
<!-- change here --><property name="file.chooser.recent.files" value="$USER_HOME$/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Gluon/SceneBuilder.lnk C:/Program Files/Java/jdk1.8.0_141" />
<property name="jdk.selected.JAVA_MODULE" value="1.8" />
<property name="file.gist.reindex.count" value="641" />
<property name="lastTip" value="3" />
<property name="settings.code.style.selected.tab.JAVA" value="Tabs and Indents" />
<property name="FileTemplates.SelectedTemplate" value="HTML File" />
</component>
</application>
我找到了我的SceneBuilder exe所在的位置,并更改了两个文件中的路径。
other.xml
<application>
<component name="JavaFxSettings">
<!-- change here --><option name="pathToSceneBuilder" value="$USER_HOME$/AppData/Local/SceneBuilder/SceneBuilder.exe" />
<!-- change here --><option name="myPathToSceneBuilder" value="$USER_HOME$/AppData/Local/SceneBuilder/SceneBuilder.exe" />
</component>
</application>
options.xml
<application>
<component name="PropertiesComponent">
<property name="Default.savedEditorTheme" value="_@user_Default" />
<property name="installed.kotlin.plugin.version" value="1.2.10-release-IJ2017.3-1" />
<property name="project.wizard.group" value="JavaFX Application" />
<property name="project.wizard.template" value="JavaFX Application" />
<!-- change here --><property name="file.chooser.recent.files" value="$USER_HOME$/AppData/Local/SceneBuilder/SceneBuilder.exe C:/Program Files/Java/jdk1.8.0_141" />
<property name="jdk.selected.JAVA_MODULE" value="1.8" />
<property name="file.gist.reindex.count" value="641" />
<property name="lastTip" value="3" />
<property name="settings.code.style.selected.tab.JAVA" value="Tabs and Indents" />
<property name="FileTemplates.SelectedTemplate" value="HTML File" />
</component>
</application>
最后,我重新启动IntelliJ并右键单击FXML
文件并选择“在SceneBuilder中打开”并且它有效。