2 Minutes To Code (β Version)

'javac' command - 2 minute tutorial

How to set destination for storing compiled classes

By default, javac command will put the compiled class in the folder containing the respective source code.

However, if you want to keep the folders containing the source code files separate from the ones containing the compiled classes, then use the option -d and specify the destination folder name.

In the example below, the compiled classes will be kept in the folder binaries.