Target JDK Configuration

There are several settings that you have to configure if you want to write, compile, execute, and debug code that is not designed for the IDE's default JDK.

Parsers

If you are writing code for JDK 1.4 that contains assertions, make sure the Java parser is set to recognize assertions. The parser is set to recognize assertions by default. You can change this setting by selecting the Java Sources node in the Options window and setting the Enable JDK 1.4 Source property accordingly. See Working With Assertions for more information.

Compiler Types

You can set a compiler type to compile for a specific JDK by using that JDK's javac compiler. To do so, select the compiler type in the Options window. Then use the compiler type's External Compiler property to navigate to the compiler executable.

You can also set a compiler type to use the default JDK's javac but compile against a different JDK's libraries. To do so, make a copy of the External Compiler and point its Boot Class Path property to the target JDK's libraries. See Cross-Compiling Between Java Platforms for more information.

If you are writing code that contains assertions, you must also set the compiler type's Enable JDK 1.4 Source property to True. Any code compiled by this compiler type will then be runnable only on JDK 1.4.

Executors

You set any execution type except the interal executor to execute a program with a different JDK. To do so, select the execution type in the Options window and click the ellipsis (...) in the External Process property. Then click the ellipsis in the Process field to navigate to the target JDK's java executable.

If you want to enable assertion checking for your code, set the execution type's Enable Asserts property to True.

Debuggers

You can change the target JDK for a debugger type by changing the debugger executable that the debugger type uses. To do so, select the debugger type in the Options window and click the ellipsis (...) in the External Process property. Then click the ellipsis in the Process field to navigate to the target JDK's debugger executable.

You can also use the default JDK's debugger to debug against a different Java platform. To do so, select the debugger type and set the Boot Class Path to the target JDK's libraries.

If your target JDK is JDK 1.4 and your code contains assertions, you also have to set the Enable Asserts property True.

See also
Configuring the Executor
Configuring the Compiler
Configuring Debugger Types
Configuring Java Settings
Switching JDKs
Working With Assertions
Cross-Compiling Between Java Platforms

Legal Notices