Previously, when I configured environment variables, I directly searched for the ready-made environment variables from the Internet and moved them to use them. Today I have nothing to understand. The following is a summary:
Configure environment variables:
1. Install JDK and customize the directory;
2. After the installation is complete, right-click "computer"> "properties"> "Advanced System Configuration"> "advanced"> "environment variable ";
3. In "system variables", set three attributes: java_home, path, and classpath (case-insensitive). if it already exists, click "edit". If it does not exist, click "new ";
4. Configure java_home first. Here is the JDK installation directory, as shown in"C: \ Program Files \ Java \ jdk1.6.0 _ 10"
Configure path. Here, configure the JDK bin directory and jdk jre/bin directory, this allows the system to identify Java commands in any path (to start the doscommand window to execute javac and other tools at any location, the system can find the location of these tools. When DOS is opened in the directory where javac is located under the installation directory, the javac program will be started, but javac cannot be found if no environment variable is configured .): % Java_home %/bin; % java_home %/JRE/binI didn't understand % java_home % before, but now I understand that actually a variable is referenced. The value of the variable is the java_home path just set;
Note: Other variables may be configured in the path. Do not delete other variables. Otherwise, other programs may be affected and may not run; if Oracle environment variables are configured in path
% Java_home %/bin; % java_home %/JRE/binPut it in front of the Oracle variable (there are kids shoes on the Internet, which has not been verified)
Finally, configure classpath, which is set.; % Java_home %/lib/dt. jar; % java_home %/lib/tools. JarNote the preceding point. Separate environment variables with semicolons ([:] For Linux).