This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently the free-form projects use the JVM the IDE is run to execute ANT scripts. This will compile the project and use those specific libraries. The IDE then seems to use the source version to map to a given JVM for code completion and other IDE tasks while working with the project. The ANT script would be much better if when "not" run from the IDE it used the current JVM of ANT, but when run while the IDE is running and working it would run with a project properties chosen JVM/Java Platform. This would allow the user to get around certain issues. For instance, NB 5.5 can run on Java 1.6 (6) and it can be registered as a platform. However, the project type only allows a source level of 1.5. If one has a 1.5 platform registered yet wants to work with a 1.6 JDK this will not work. The IDE will use 1.5 for the code completion instead of 1.6 even when the IDE is run on a 1.6 JVM. Which means in NB 5.5 or 5.0 one has to unregister all 1.5 platforms to work on a Java 1.6 project. The issue with the IDE not using the registered 1.6 JVM is just part of the issue and I will sign it up as a separate issue, but it goes hand in hand with the IDE not using a specific java version or platform when building as the user will have a specific target and this could be selectable instead of the IDE figuring this out automatically by source version. Then it would not have any bad side effects if when not run in the IDE it used the default JDK ANT is running under the rest of the time.
*** This issue has been marked as a duplicate of 64160 ***