This article has shared a tutorial on java development environment configuration for your reference. The specific content is as follows
Configure environment variables
Win 7 configuration (win 10 configuration is below):
1. After the installation is completed, right-click "My Computer", click "Properties", and select "Advanced System Settings";
2. Select the "Advanced" tab and click "Environment Variables";
Then the picture shown in the following figure will appear:
Set three attributes in "System Variables", JAVA_HOME, PATH, CLASSPATH (Case doesn't matter). If it already exists, click "Edit", and if it does not exist, click "New".
The variable setting parameters are as follows:
Variable name: JAVA_HOME
Variable value: C:/Program Files (x86)/Java/jdk1.8.0_91 // Configure according to your actual path
Variable name: CLASSPATH
Variable value: .;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar; //Remember there is a "."
Variable name: Path
Variable value: %JAVA_HOME%/bin; %JAVA_HOME%/jre/bin;
JAVA_HOME Settings
PATH settings
CLASSPATH Settings
This is the Java environment configuration. After the configuration is completed, you can start Eclipse to write the code, which will automatically complete the configuration of the Java environment.
Note: If you use JDK version 1.5 or above, you do not need to set the CLASSPATH environment variable, and you can also compile and run Java programs normally.
Test whether the JDK is installed successfully
1. "Start"->"Run", type "cmd";
2. Type the command: java -version, java, and javac commands. The following information appears, indicating that the environment variable configuration is successful;
Win 10 configuration: <
All the others are the same, only the PATH path settings are different:
The settings of PTAH are as follows: To use the absolute path (first and second), after setting, you need to restart the cmd command window:
Test whether the JDK is installed successfully
1. "Start"->"Run", type "cmd";
2. Type the command: java -version, java, and javac commands. The following information appears, indicating that the environment variable configuration is successful;
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.