Java sets the meaning of environment variables (JAVA_HOME, PATH, CLASSPATH), java_homeclasspath
Before developing a Java program, you must install and configure the Java Development Environment on the computer. One is to directly install Myeclipse and compile and run it using its own JDK; the other is to install JDK on our Windows or Linux platform and configure environment variables. (As the JDK version is updated, the default JDK of Myeclipse remains unchanged unless the latest version of Myeclipse is upgraded.) to install JDK on the operating system platform, the most troublesome thing is to configure environment variables:
1. JAVA_HOME(Windows is case insensitive and Linux is case sensitive) JDK installation path.
C: \ Program Files \ Java \ jdk1.8.0 _ 91 JAVA_HOME is installed by default in the blog, the purpose is to facilitate the configuration of JAVA_HOME in the PATH and CLASSPATH paths. The purpose is to facilitate the configuration of PATH and CLASSPATH paths.
2. PATHSince JDK is installed on the computer, the JDK installation path also contains the java and javac commands, but the computer does not know where to find the two commands. If you can find this command, the command can be modified. C: \ Program Files \ Java \ jdk1.8.0 _ 91 \ bin. Of course, if you set JAVA_HOME, you can also % JAVA_HOME % \ bin; when the JAVA_HOME value changes, you do not need to modify the PATH.
3. CLASSPATHAfter configuring the PATH, you can compile the Java class normally and generate a class file in the current PATH. When using java commands to execute classes, where should JRE search for Java classes? Therefore, CLASSPATH is used to create a JRE path to search for Java classes. In versions earlier than JDK1.4, you must add (.) to the CLASSPATH environment variable (.) set the current path, and JRE later than JDK will automatically search for class files in the current path, and the system will automatically load dt. jar and tools. therefore, you do not need to set the CLASSPATH environment variable.
All in all, in environment variables after JDK, we only need to configure PATH. That is, let the computer find the java command.
15:00:00