In this section we will discuss about DOS commands.
If you are developing Java program on windows then you should learn these DOS commands.
The knowledge of DOS command will help you in compiling and executing Java programs from DOS prompt.
Before Windows, there was the ugly, command line oriented Disk Operating System (DOS).
if you're using Sun's JDK (SDK), you might use DOS to compile and execute your Java programs, or to run one of the Sun Java utilities.
You can start a DOS window with Start menu, Programs, Accessories, Command Prompt.
Abbreviations: f - file name or path, dir - directory name or path, r - drive. Case doesn't matter to DOS, but it does matter to java. CON is the console. \ is the name of the root directory on a drive.
|EXIT||Exit from DOS|
|DIR||Prints the current directory.|
|DIR /O||Prints the current directory, sorted by file name.|
|DIR /P||Prints the current directory one screenful ("page") at a time. Useful when there too many files for one screen.|
|f||Entering a filename executes the program in that file It should have an extension of .EXE or .BAT (or a few others).|
|r:||Change to drive r. Eg, A: changes to the floppy disk.|
|CD dir||Make d the current directory. (CD is same as CHDIR)|
|CD ..||Move up one directory|
|CD \||Move to root directory on the current drive.|
|MKDIR dir||Create a new directory|
|RMDIR dir||Delete (remove) directory d, which must be empty first.|
|COPY f dir||Makes a copy of the file f in dir|