Configuration of jdk environment in java

1. First of all, we must understand what the jkd environment is:

After installing java , you can execute the command to compile the java code, but only if you enter the Java installation directory to execute (for example: qq also needs to enter the directory to run the qq.exe file when there is no shortcut, so you can It can be seen that qq can be opened with a shortcut, so java can also, but you need to configure the Java environment variable, and configure the java path to the system environment variable).

If you have multiple versions of jdk and you want to use one of them and not use the other temporarily, you can configure the path of the jdk version you want to use before the path of the jdk version you want to use temporarily ; (this is because doc will stop looking for and run the jkd version corresponding to the path when the first path is identified , so the later jdk version that is temporarily unused will not be executed) .

In summary, it can be concluded that the configuration environment is mainly to add Java's jdk path to the system environment so that Java can run quickly

2. Problems to be paid attention to when configuring:

Path should use the separator (;) after adding the address, pay attention to use English.

After installing jdk and configuring it, execute the javac command in cmd

1. No installation check: Go to the bin directory of the java you installed in cmd and execute the javac command. If it can be displayed normally, it means the installation is correct.

2. If not, then the environment variable configuration is wrong. Reconfigure, and do not copy all the paths by hand.

Note: If you have multiple jdk (different versions), when you want to use one of the jdk versions first, adjust the environment variable to the front, and its order determines the order of execution.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326612923&siteId=291194637