Compile the source code file HelloWorldMain.java using the Java compiler javac with the -d switch with the current path. Type the following command: C:\Users\myusername\myprojects\helloworld>javac -d . HelloWorldMain.java Notice the -d . before the filename. The dot denotes the current directory. The –d option (destination directory) lets the Java compiler know where to put compiled class files based on their package namespace.