In the Java Basic Learning phase, the file is generally operated under DOS command line, and some common commands are listed here.
- How to open the DOS console
Press Win+r and then enter CMD and return.
D: Return drive letter Toggle (disk multibyte colon)
Dir (directory): Lists the files and folders in the current directory
MD (Make directory): Create directory
RD (remove directory): Delete directory
CD (change directory) changes the specified directory (enter the specified directory)
CD: Back to top level directory
Cd\: Go back to the root directory
Del (delete): Delete files, delete a bunch of suffix names like files *.txt
Exit: Exit DOS command line CLS: (Clear screen) clear
Javac: Compile the. java file into a. class file that the JVM can recognize.
Java: Running a compiled. class file
CLASSPATH: Viewing environment variables
Setclasspath=.\ file directory: Set TEMP environment variable (. Refers to the current folder)
Learn Java Common DOS commands