What if you don't have an IDE like idea Eclipse on your computer, but what happens when you need to execute Java code for the job?
This is the time to use the most primitive way to execute the command line
1: first you have to install the JDK and JRE (please check the information here)
2: find the Bin directory in your Java program workspace and copy it down the Eg:bin directory is the Java code compiled file directory
As follows:
We found that there are many. class files, which are both our compiled files
3: enter cmd (win+r input cmd enter)
4: access to your java-located disk
As Follows: enter D: carriage return
4: Enter cd+ space + The bin address just copied
As follows:
5: if Your. class file is not stored under the package or in the default bag, enter java+ space + file name (remove. Class)
If Your. class file is inside the package, you will need to change the file name to the following name: enter java+ space + package Name. file name (remove. Class) Enter
Thanks for learning!
How to use command line cmd to execute a Java program