J2SE 平台未正确设置。( NetBeans IDE 8.0.2 )

Tar*_*noi 4 java netbeans-8

我在 NetBeans 中运行程序时收到此错误。

nt -f D:\\PMT_LandingPage jfxsa-run
D:\PMT_LandingPage\nbproject\jfx-impl.xml:3725: The following error occurred while executing this line:
D:\PMT_LandingPage\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)
Run Code Online (Sandbox Code Playgroud)

我是 NetBeans 新手,真的不知道如何修复它。我用谷歌搜索了这个问题但无法得到任何解决方案。

Bru*_*iro 6

转到Tools -> Java Platforms并选择 JDK 的正确路径。

  • 我遇到了这个错误,然后在“工具”-&gt;“Java 平台”下添加了另一个平台,以便能够在“项目”-&gt;“属性”下选择另一个平台。之后我切换回原来的平台,错误就消失了!这救了我的命! (4认同)