Install java in jdk and run the compilation (excluding the syntax ).
I. Development Preparation
1. jdk installation (window)
(1) download the corresponding jdk from your computer and install it (it is recommended to install it in a directory without Chinese characters ). Website http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-downloads-1880260.html
(2) to configure environment variables, we recommend that you create a java_home system variable to store the jdk path, and configure the path % java_home % \ bin; after path, although jdk can be used normally, other plug-ins that require jdk to run may not be able to read the path, such as maven.
(Jvm (java Virtual Machine), jre (java Runtime Environment (including jvm and supported by basic class libraries), jdk (including jre ))
II. The first java program (excluding java syntax)
1. Create a Hello. java file according to the syntax
Public class Hello {public static void main (String [] args) {System. out. print ("Hello World ");}}
2. run the cmd command to go to the absolute path of the java file through cmd. (Alternatively, right-click the java file path, press shift, and press ctrl to open cmd ), use the javac command to compile the java file (java programs are compiled first and then executed) and generate. class File
3. Execute the class file using the java command (the actually executed class file is the compiled class file)
(In addition to the above methods, you can also set and use tools for execution)