Setting the Target JDK in a Project By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the Detail tab. The JDK version is listed in the Java field. You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters. In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a platform and attach the source code and Javadoc to the platform. In standard projects, you can switch the target JDK in the Project Properties dialog box. In free-form projects, you have to set the target JDK in the Ant script itself, then specify the source/binary format in the Project Properties dialog box. To register a new Java platform:
To set the default Java platform for a standard project:
To set the target Java platform for a free-form project:
When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead. -- Wagner R. Santos |