
The PATH contains a set of directories where Windows looks for programs you attempt to execute from the command line. In order to compile and execute Java programs from the Windows command line, you must make sure the javac, java, and other programs included in the Java Development Kit (JDK) are all included in the Windows PATH environmental variable. Move a file from one location to another:Īssuming there is a file named HelloWorld.java in the current working directory.Īdd the Java Development Kit to the Windows PATH variable Move a file or directory from one location to another Show all details of the files and folders in the 'Users' subdirectory of the root (top-most) directory:Ĭopy a file from one location to another: Show all the details of the files and folders in the current directory: Show the names of files and folders in the current working directory: Go to the very top of the hard drive, then through the 'Users' subdirectory and into the 'foo' subdirectory Go to the very top directory of the drive (called the root directory) Go one level down into the 'foo' subdirectory: Show what directory is the current working directory: This can be run directly by typing cmd.exe into Windows' run program text field. These commands assume the user is running the CMD.exe program on Windows. 9.1 Add the Java Development Kit to the Windows PATH variable.6 Move a file or directory from one location to another.
