Configure the installation JDK and JRE first
Install the following:
Then configure the variable environment: Right-click My Computer--Properties--Advanced system settings--environment variables--system variables--Find path--Edit
Put the directory of the JDK that is installed and the bin directory under the JDK directory
Example: C:\java\jdk1.8.0_111; C:\java\jdk1.8.0_111\bin, because the directory where I installed the JDK is installed directly under the C drive.
Next configure the variable environment lib (that is, library): Right-click My Computer--Properties--Advanced system settings--environment variables--System variables--new Classpath
Put the directory of the installed JDK and the directories of the JDK to scare the Lib directory into it
Example: C:\java\jdk1.8.0_111; C:\java\jdk1.8.0_111\lib;
Tip: If you find these directories difficult to distinguish, you can put the root directory and bin and the Lib directory under path and classpath, do not conflict.
Continue, install Eclipse.
Then: File--New--java Project
Then right--new--Class
Select options as shown in the diagram.
Java Environment Configuration-eclipse New Project