1. Computing

Creating Your First Java Program


6 of 9

Change the Directory
Change the Directory

Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.

Next, navigate to where your HelloWorld.java file is saved. As I said earlier, my file has been saved in a directory called "Java" in My Documents. Its location is "C:\Documents and Settings\Paul\My Documents\Java".

To change the directory in the terminal window, type in the command:

cd *directory where HelloWorld.java file is saved*


cd C:\Documents and Settings\Paul\My Documents\Java 

You can tell if you’re at the right directory by looking to the left of the cursor.

©2014 About.com. All rights reserved.