Using DOS command to run Java program

Run Java programs using the DOS command
First find the location of the program and compile the program with javac
Open the DOS window at the location of the class


A file with the same name but with the suffix.class is generated in the current directory
You need to jump the pointer back to the root directory (SRC) and run it
Note: The runtime needs to be prefixed with the package name
F:\ViC_GymSystem\src> java com.aaa.ViC_GymSystem.Test
If you need to pass an argument, you can just add the argument and separate it with a space
Encoding – unicod utf-8

Read More: