您的活动平台是:JDK_1.6,但相应的属性“platforms.JDK_1.6.home”是在项目的属性文件中找不到

发布于 2024-08-06 02:40:30 字数 336 浏览 2 评论 0原文

我是一名 Java 菜鸟(但已经有 25 年以上的编程经验,并且从第一天起就开始使用 OO 语言)。

突然间,我开始收到此错误:

Your active platform is: JDK_1.6, but the corresponding property "platforms.JDK_1.6.home" is not found in the project's properties files. 

不确定是什么导致了这种情况,并且不确定 Java 要求我做什么。我正在 NetBeans IDE 中工作。我尝试做的最后一件事是向我的项目添加一些二进制(图像)资源。

I'm a Java noob (but have been programming for 25+ years, and have worked with OO languages from day 1).

All of a sudden I started getting this error:

Your active platform is: JDK_1.6, but the corresponding property "platforms.JDK_1.6.home" is not found in the project's properties files. 

Not sure what caused this condition, and not sure what Java's asking me to do. I'm working in the NetBeans IDE. The last thing I attempted to do is add some binary (image) resources to my project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

贱贱哒 2024-08-13 02:40:30

就我而言,Netbeans 中的 JDK 设置很好。这只是那些突然出现的奇怪的 Netbeans 问题之一。

我的修复方法是:

清除 Netbeans 缓存,即删除文件夹:
C:\Users\\AppData\Local\NetBeans\Cache\

In my case the JDK setup in Netbeans was fine. It was just one of those strange Netbeans issues that come out of nowhere.

My fix was:

Clear the Netbeans Cache i.e. delete the folder:
C:\Users\\AppData\Local\NetBeans\Cache\

温柔女人霸气范 2024-08-13 02:40:30

这意味着您还没有告诉 netbeans 您的 Java 1.6 安装位置。进入设置,添加 JDK(JDK->Add->New),然后为 JDK16 选择“bin”上方的目录。

It means you haven't told netbeans where your Java 1.6 installation is. Go into settings, add the JDK (JDK->Add->New), and select the directory above 'bin' for your JDK16.

忆伤 2024-08-13 02:40:30

此错误可能在两种情况下发生:

  1. 右键单击​​您的 netbean 项目 ->属性->图书馆
    选择 Libraries 后,在顶部右侧面板中您可以看到“Java Platform”组合框。您的项目缺少此 Jave 平台。您需要使用 Jave 平台组合框旁边的“管理平台”底部进行添加。
  2. 即使场景(1)是正确的,它也可能发生。因为您的项目引用了库中的另一个 netbean 项目。此参考项目缺少 Jave 平台。

This error can occur at two scenarios:

  1. Right click your netbean project -> Properties -> Libraries
    After select Libraries , right panel on top you can see "Java Platform" combo box. This Jave Platform is missing for your project. You need to add using Manage Platforms bottom beside Jave Platform combo box.
  2. Even thought scenario (1) is correct it can happen. Because your project has reference to another netbean project in your Libraries. This reference project is missing Jave Platform.
滥情稳全场 2024-08-13 02:40:30

我的办公室有Linux,家里有Mac,当我在github上共享项目时经常出现这个问题,我解决了这个问题,删除了构建目录并进行了清理和构建。

I have Linux in my office and Mac in Home and this problem is frequently when I share projects in github, I solve it removing the build directory and doing clean and build.

女皇必胜 2024-08-13 02:40:30

右键单击项目 - 属性 - 库 - 从 Java 平台组合框中选择正确的 jdk 版本。

Right click on project - Properties - Libraries - Select the correct jdk version from the Java Platform combobox.

开始看清了 2024-08-13 02:40:30

NetBeans bug

  1. 如果您的项目依赖于其他项目,请打开并清理构建所有这些项目(这为我修复了它)。

    如果

  2. 很可能是与缓存相关的东西。按照之前某人的建议清理 NB 缓存

NetBeans bug

  1. If your project depends on other projects, open and clean build all of them(that fixed it for me).

  2. Most likely cache-related stuff. Clean up NB cache as suggested by someone before

汐鸠 2024-08-13 02:40:30

您应该删除 nbproperties 文件夹中 private 文件夹下的文件。

You should remove the files under private folder in the nbproperties folders.

苏佲洛 2024-08-13 02:40:30

对我来说,任何早期推荐的方法都没有帮助,但改变项目属性 - >源/二进制格式为 JDK 7,保存后更改回 JDK 8 修复了此错误

for me any recommended way early didn't helped, but changing in project Properties -> Source/Binary format to JDK 7, Save than change back to JDK 8 fixed this error

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文