繁体   English   中英

您的活动平台是:default_platform,但未找到相应的属性“platforms.default_platform.home”

[英]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)

你如何解决这个问题?

解决此问题的最简单方法是:

  1. 在NetBeans中打开项目
  2. 打开该项目的项目设置
  3. 检查(并可能纠正/修复)所有设置(包括平台设置)
  4. 单击设置对话框中的保存/确定
  5. 清洁+建造项目

这样,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.

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