If you organize your work into projects, you can set different options in the Project Settings window for compilation, execution, and debugging for each project. Open this window by choosing Project | Settings... from the main menu.

If you select the Java Sources node in the left pane, you can set the project's defaults compilation, execution, and debugging in the right pane.

If you select the Compiler Types, Execution Types, or Debugger Types node, you can configure the compilers, executors, or debuggers themselves.