简体   繁体   English

Scene Builder 2.0无法启动

[英]Scene Builder 2.0 not launching

Someone seems to have had a similar issue before. 以前似乎有人遇到过类似的问题

On a fresh install of Windows 8.1 I've installed Netbeans, the lastest JDK, and the JavaFX Scene Builder, but the Scene Builder isn't running. 在Windows 8.1的全新安装中,我安装了Netbeans,最新的JDK和JavaFX Scene Builder,但是Scene Builder没有运行。

Usually the issue is with the Scene Builder window not appearing/opening files, but right now I can't get it to open for a first run. 通常,问题是“场景生成器”窗口没有出现/没有打开文件,但是现在我无法让它第一次运行打开。 No error messages, and running it from the command line doesn't return anything. 没有错误消息,并且从命令行运行它不会返回任何内容。 The program doesn't seem to appear in the Task Manager, and there's no icon showing on the task bar. 该程序似乎没有出现在任务管理器中,并且任务栏上没有显示图标。

I also have BitDefender installed (like the person in the other question), but disabling it doesn't seem to help. 我还安装了BitDefender(就像另一个问题的人一样),但是禁用它似乎没有帮助。

I uninstalled Scene Builder 2.0 and installed Scene Builder 1.1. 我卸载了Scene Builder 2.0并安装了Scene Builder 1.1。 It wouldn't start either, but it seems it's more verbose in it's errors. 它也不会启动,但是似乎它的错误更为冗长。 I got two errors this time: "Failed to create JVM" and "Failed to Launch JVM" . 这次我遇到两个错误: "Failed to create JVM""Failed to Launch JVM"

Searching those two errors led me to this post outlining a fix that worked for me. 搜索这两个错误使我想到了这篇文章,概述了对我有用的修复程序。 Even though I had loads of free memory the default settings attempt to set the max amount of memory for the heap to 999MBs, and it seems the JVM was failing to launch because of that. 即使我有大量的可用内存,默认设置还是尝试将堆的最大内存量设置为999MB,这似乎导致JVM无法启动。

I'm not sure what the issue with that value is but looking at the docs for the -Xmx argument : "This value must be a multiple of 1024 and greater than 1 MB". 我不确定该值的问题是什么,但请查看-Xmx参数文档 :“此值必须是1024的倍数且大于1 MB”。 But I've used values that weren't multiples of 1024 before (On my previous installs I never had this issue, and presumably the value was 999), and 1024 itself doesn't seem to work, so I'm still not completely sure on the exact source of the issue is. 但是我之前使用的值不是1024的倍数(在以前的安装中,我从未遇到过此问题,并且大概是999),而1024本身似乎不起作用,所以我仍然不完全确定问题的确切来源是。

The fix mentioned in the post might have worked simply because it happened to set the value to a multiple of 1024: 文章中提到的修复程序之所以可能起作用,仅仅是因为它碰巧将值设置为1024的倍数:

  • Go to HKEY_CURRENT_USER\\Software\\JavaSoft\\Prefs\\com\\oracle\\javafx\\scenebuilder\\/J/V/M/User/Options in regedit 转到HKEY_CURRENT_USER\\Software\\JavaSoft\\Prefs\\com\\oracle\\javafx\\scenebuilder\\/J/V/M/User/Options in regedit
  • Change the value for -/Xmx from 999m to 512m -/Xmx的值从999m更改为512m

Looks like SceneBuilder needs Java Development Kit 9. I'm using just the jar file of SceneBuilder, version 9.0.1 from Gluon, and JDK9 from Oracle which works with it. 看起来SceneBuilder需要Java Development Kit9。我仅使用SceneBuilder的jar文件,Gluon的9.0.1版本和Oracle的JDK9与其配合使用。

To get it to start I use this script (file workaround.bat): 要启动它,我使用以下脚本(文件workaround.bat):

set BUILDER_PATH=c:\Work\scenebuilder-9.0.1-all.jar
set curdir="%cd%"
cd "c:\Program Files\Java\jdk-9.0.4\bin"
call java -jar %BUILDER_PATH% %1 %2 %3
cd %curdir%

Sorry I don't have NetBeans, but in Eclipse, configure JavaFX like this: 抱歉,我没有NetBeans,但是在Eclipse中,像这样配置JavaFX:

在此处输入图片说明

Launching using context menu then works! 然后使用上下文菜单启动!

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM