Download JDK, official website: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
Direct address: Http://download.oracle.com/otn-pub/java/jdk/8u25-b18/jdk-8u25-windows-x64.exe? authparam=1419144672_f027b19f20da23ae3f43e9c72295151a
Install the JDK,
Windows environment installation, if you do not need to modify the installation path, directly next ... Until the installation is successful, here will not repeat;
The default for JDK in the path is C:\Program files\java\jdk1.7.0_67, (jdk1.7.0_67 is the version number of the JDK).
To facilitate Java program development, you need to configure the environment variables:
Configuration environment variable name Description :
Path: Sets the Directory of the Java compilation Run tool;
Classpath:java the directory where the required tool class is called;
JAVA_HOME:JDK installation path, I use the default installation is C:\Program files\java\jdk1.7.0_67;
Configuration process:
First step: Right click on My Computer icon, select Properties
The second step: Select Advanced system settings (because my system is in English, so the corresponding option is "Advance system settings")
Step three: Select the environment variable (English corresponds to "envrironment Variables ...")
Fourth step: Click on the "New" button (new), Pop up a dialog box, corresponding to fill java_home, and JDK installation path is determined;
Fifth step: Add%java_home%\bin;%java_home%\jre\bin in Path; (if there is no path entry, create a new one such as step fourth)
Sixth step: Create a new Classpath entry with the content:.; %java_home%\lib; Note: The first one is.;
Seventh Step: Verify that the JDK environment variable is configured successfully;
Enter the Java, Javac command separately in the console window, and if you get the following result, the configuration is successful:
In this case, the Java JDK environment variable is configured successfully, and the small partners can gallop in the Java world.
Java program running process:
1. Compile the Java source file: First, under the console, cut to the path where the source file is located, and then enter the Javac file name. java.
Compile the Java source file into an executable class bytecode file;
2. Run the executable bytecode file: Under Console, enter the Java class name (Note that no. class suffix is required here);
First, Dark Horse programmer--java Basic---Java environment variable configuration