![](/img/trans.png)
[英]Java-netbeans: Cannot run program "${platforms.default_platform.home}\bin\java
[英]Your active platform is: default_platform, but the corresponding property "platforms.default_platform.home" is not found
我目前正在开发 JavaFX 应用程序。 我以前使用 Netbeans 7.4,但现在我切换到 Netbeans 8.0.2。 使用新的 IDE 运行我的项目后,出现错误消息:
C:\projects\client\QueueBoard\nbproject\build-impl.xml:87: The J2SE Platform is not correctly set up.
Your active platform is: default_platform, but the corresponding property "platforms.default_platform.home" is not found in the project's properties files.
Either open the project in the IDE and setup the Platform with the same name or add it manually.
For example like this:
ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.default_platform.home" in a .properties file)
or ant -Dplatforms.default_platform.home=<path_to_JDK_home> jar (where no properties file is used)
BUILD FAILED (total time: 0 seconds)
你如何解决这个问题?
解决此问题的最简单方法是:
这样,project-settings-file将更新为当前设置。
干杯!
我知道这是一个非常古老的问题,但我最近遇到了这个问题。 我想出的解决方案是修改用户可编辑的build.xml
文件(通常是 build-impl.xml 的一个目录)并在 build- build-impl.xml
的<import>
之后添加以下内容:
<property name="platforms.default_platform.home"
location="${java.home}/.."/>
这允许任何用户/本地设置具有优先权,但如果未定义,则使用的 java 应该与正在执行 Ant 的 java 相同。
这个问题在 Netbeans 15 中仍然存在,可以通过更新nbproject/private/private.properties
文件并确保此行存在来解决:
javac.debug=true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.