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.
Setting up a freeform project with existing ant- build- file and existing sources a change of source level seems to have no effect. The source level seems to be dependent from the java- vm netbeans is running with. (i.e. when running netbeans with jdk 1.5 and using a project build with 1.4, all warnings etc. according 1.5 appear despite of the selected source level in project properties)
Currently, the Source Level setting affects only the IDE itself (editor, etc.). The build script is run using the JDK that was used to run the IDE (in fact, the ant runs in the same virtual machine). Issues #64160 and #41689 handle this. Currently, the workaround is to modify the build script to fork the javac into a specific JDK (and/or set source and target to the javac task). Sorry. *** This issue has been marked as a duplicate of 64160 ***