1. Home
  2. Computing & Technology
  3. Java

Creating Your First Java Program

By Paul Leahy, About.com

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*

E.g.,

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.

Explore Java
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Java
  4. Getting Started
  5. Change the Directory

©2009 About.com, a part of The New York Times Company.

All rights reserved.