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

StackOverflow https://stackoverflow.com/questions/1500847

Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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\

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.

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.

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

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top