Java 6 in 21 Days (5th Edition): Using the JDK on Windows

The cover of Teach Yourself Java 6 in 21 Days (5th Edition) by Rogers Cadenhead

Home Buy the Book Thanks Other Books

Opening a Folder

When you are using MS-DOS on a Windows system, you will have access to all of the folders you normally use in Windows. For example, if you have a Windows folder on your C: hard drive, the same folder is accessible as C:\Windows from an MS-DOS Prompt.

To open a folder in MS-DOS, type the command CD followed by the name of the folder and press Enter, such as this example:

  • CD C:\TEMP

The TEMP folder on your system's C: drive will be opened, if it exists. After you open a folder, your command line will be updated with the name of that folder, as shown below.

Opening a new folder

You also can use CD in other ways:

  • CD \ -- open the root folder on the current hard drive.
  • CD subfoldername -- open a subfolder matching the name, if one exists
  • CD .. -- open the folder that contains the current folder. For example, if you are in C:\Windows\Cookies and you use the CD .. command, C:\Windows will be opened.

One of the book's suggestions was to create a folder called J21work where you could edit, compile, and run Java programs. If you have already done this, you can switch to that folder by using the following commands:

  • CD \
  • CD J21work

If you haven't created that folder yet, you can accomplish that task within MS-DOS.

To learn how to create a folder, continue to the next page.