Have to spit out the groove, installation configuration This eclipse is really hard ... Here's a summary so you can install it next time
I win10 system, 64-bit machine
First, download the Eclipse installation package on the official website
File name: Eclipse-inst-win64.exe
Website: https://www.eclipse.org/downloads/download.php?file=/oomph/epp/oxygen/R/eclipse-inst-win64.exe
Recommended download before clicking "Select another Mirror", select a domestic mirror, this will be much faster
Only one installation software is not enough, please look at the following article
Second, download and install Jdk&jre
File name: Jdk-8u131-windows-x64.exe
Website: http://download.csdn.net/detail/tan3739/9836652
If you need to know the difference between the JDK and the JRE can search, can find a lot, in short, is probably the JRE is the Java Runtime Environment, the JDK as the name implies Java Development Kit, is the programmer in the Java language to write Java programs required by the development kit, is provided to programmers and the JDK contains the JRE.
Downloading from here is faster than opening the site where the Eclipse installation package jumps
My situation is jdk-8u141-windows-x64.exe after downloading cannot open, for reference
I choose is installed in the default path, do not know whether the installation in the non-C disk will have an impact, for reference
Third, configure environment variables
Right-click "My Computer"-"advanced"-"Environment variables"
1) Create a new java_home variable in the system variable, the value of the variable is: C:\Program files\java\jdk-8u131-windows-x64 (fill in according to your own installation path)
2) New CLASSPATH variable, variable value is:.; %java_home%\lib;%java_home%\lib\tools.jar
3) Add the variable value in the path variable (existing without new):%java_home%\bin;%java_home%\jre\bin (Note the ";" between the variable values) Separated
4. Verify that the configuration is complete: "Start"-"Run"-Input "cmd"--Enter,
Enter "Java"--carriage return,
Enter "Javac"--carriage return,
Type "Java-version" and enter.
If you can print the usage instructions correctly, the configuration is successful!
Analysis of supplemental environment variables:
Installation path for JAVA_HOME:JDK
Classpath:java load Classpath, only the class is recognized by the Java command in Classpath, and a "." is added before the path. Represents the current path.
Path: The Java,javac command can be recognized by the system under any path.
One and two or three order can be reversed
Iv. installation of Eclipse
This is relatively simple, first open the previous download good Eclipse-inst-win64.exe
1) Select the installation package
2) Select the installation directory
The pro-test installation is also possible on e-drive
And wait for the installation to finish.
V. Use of Eclipse
1) The first time you need to set up a working environment, you can specify the working directory, or use the default C working directory, click the OK button.
2) Create a project
3) Enter the project name, such as I enter ORZ_JLX, then click Finish
4) then select the ORZ_JLX item on the left menu, right---new--class (it is not convenient to use QQ here, so omit)
5) Type the class name, such as enter Main, and then click Finish
6) Writing code
Example:
Public class Main { publicstaticvoid main (String []args) { System.out.println ( "Hello World");} }
7) Run
Online to say that, Java is automatically compiled, ctrl+s after the automatic compilation of good
Click to select "Run As->java application
You can see the results of the program running in the console window
Finish.
Rookie starter Install configure Eclipse and write the first Java program to run