1. Environment variable Setting
My Computer right--Properties--Advanced system settings-environment variables--System variables (new)
Variable name: java_home (New)
Variable Value: C:\Program files\java\jdk1.7.0
Variable name: CLASSPATH (New)
Variable value:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; (Note the preceding punctuation.)
Variable name: Path (Append)
Variable value:%java_home%\bin;%java_home%\jre\bin;
2. JDK compiled Java file
There are javac.exe programs in the Java_home\bin directory to compile Java files
The wording is: Javac *.java
* For Java names, Java files should be placed under the bin directory.
3. Run the class file
Java *
* As class file name, you need to run the command in the class directory
4. Running the jar package
Java-jar *.jar
* For file name, run the command in the jar file directory
Java Environment Variables and basic compilation operations