Title: Dos/Windows Help
Course: CPS 261: Advanced Java Concepts ~ DL & MM MASTER

DOS Notes

Because we are using the Toolkit from Sun which uses a command line environment, it is necessary to use DOS on a PC. In case you are not real familiar with using DOS, here are some handy things to know.
- When in MsDos, you can navigate with the cd command. For example, if you are in directory c:\java\prog1 and you want to go to c:\java\prog1\samples then issue the command
cd samples
- If you are in directory c:\java\prog1 and you want to go to directory c:\java then issue the command
cd ..
- cd \ takes you to the top of the directory tree for the disk drive you are on. Normally, this is c:
- If you have a d drive, use d: to set your directory to your d drive
- The dir command can be used to list the contents of the current directory.
- The doskey command can be used to put MsDos into a mode where the up arrow and down arrow can be used to navigate through your command history.
- The set command can be used to observe the current MsDos environment variables.
- The Following set commands might be useful to you:
set HOMEPATH=\java
set HOMEDRIVE=C:
If someone has modified your CLASSPATH environment variable, then you will probably need to set it with a command something like:
set CLASSPATH=.;C:\jdk\classes;C:\jdk\lib\classes.zip
- Issue the set command to see your environment variables (such as HOMEPATH, CLASSPATH, etc.). If you are having problems with executing your compiled java, it might be handy to issue the set command to see if your CLASSPATH is set to something.
- If your CLASSPATH is messed up you can fix it with something like:
set CLASSPATH=.;C:\jdk\lib\classes
- The doskey is optional. The set CLASSPATH command is only needed if someone has already messed with the environment variable on this machine.
- Once you have completed this, all you need to do is go to some directory on your PC and start programming. The compiler is javac, the command line virtual machine execution enviornment program is java, and the appletviewer allows you to test out your applets without actually using a web browser.

Windows Information

- To quickly get to the File Explorer, right click on the start button and select Explore.
- To make a backup copy of a file, right click on the file and select Copy. Then right click on the folder where you want the file to be copied to and select Paste. If this is in the same folder as the source, then the copy will have a slightly different name that starts with copy. You can then right click on the new file and select Rename if you want a different name. If the first operation is changed from a Copy to a Cut, the you will effectively move the file.
- For editting your java and html source you can use Notepad or Wordpad. These programs can be found in Start-->Programs-->Accessories-->Wordpad.