Sams Teach Yourself Java 6 in 21 Days

Using the JDK on a Windows System

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.


Search terms used to find this page: Java programming, teach yourself, 21 days, how to, learn, Sams, Pearson, Macmillan, Java 6, JDK 6, Java6, JDK1.6, Java 1.6, JDK 1.6, SDK1.6, Java 6 SDK 1.6, SDK 1.6, Java 6 version 1.6, Java 6 SDK, Java SDK, Rogers Cadenhead, Laura Lemay, tutorial, hands-on, source code, code, javac, java, application, appletviewer, help, learning, applet, servlet, servlets, JSP, Swing, GUI, interface, XML, JavaSound, Java2D, JDBC, JavaBeans, object serialization, IO, Tomcat, Apache, Java API for XML Parsing, Java API for XML Processing, XML-RPC, XOM, Web services, regular expressions, regex, java.nio, buffers, channels

Valid HTML 4.01!

Valid CSS!