CLS | Clear screen |
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 directory d. |
COPY f1 f2 | Makes a copy of the file f1 and names it f2. |
REN f1 f2 | Renames the file f1 as f2. (Same as REN) |
DEL f | Deletes the file f. |
TYPE f | Copies the file f to the console screen. |
MOVE f1 f2 | Copies file and deletes original. Supports wildcards. |
APPLETVIEWER f | Runs the appletviewer. f can be any file containing
an <applet code="..." width="..." height="..."> tag. |
JAVAC F.java | Compile the java source file and write the object code
into a .class file. f must have an extension of .java |
JAVA F | Run the Java file in F. F is the name of the
.class file that contains a main method, but
without the .class extension. |
JAVAW -jar f.jar | Runs a program in the jar file, if it's set up for that. |
JAR -xf f.jar | Unpacks jar file into current directory. |
SET CLASSPATH=... | Java needs to know where packages and classes
are located. To use additional classes,
set this to the .jar file or directory containing the desired classes.
For example, here is how my classpath is set:
SET CLASSPATH=.;C:\javaclasses;C:\javaclasses\jakarta-regexp-1.1.jar;
This sets the class path to . ("dot" is the current directory - you should always
specify this if you do anything with classpath), the name of the directory
C:\javaclasses that might have directories and classes in it, and a
jar (Java Archive) file.
|
PATH | Shows current DOS search path for executable programs/commands. |
PATH pathlist | Sets path to list of paths,
separated by semicolons. Use %PATH% for current value. |
SET | Shows current settings of environment variables (PATH, etc). |