Home > Java > javaTutorial > Configuration and installation of java environment (pictures and texts)

Configuration and installation of java environment (pictures and texts)

不言
Release: 2019-03-19 09:10:18
forward
6865 people have browsed it

The content this article brings to you is about the configuration and installation of the Java environment (pictures and texts). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

1. Install the JDK development environment

First log in to https://www.oracle.com

Step one: Products ---- Java ---- Download java(JDK) for Developers

# #Step 2: Find Java SE 8U202 when entering another interface and click JDK (Download) to download

Step 3: Download the java development environment

Step 4: Find the java development environment you downloaded, right-click and run as administrator

Step 5: You can change the installation directory according to your own needs. After changing, click Next

Step 6: After the installation is successful, another installation will appear. You can not install it because the Jre is being installed.

Why not install it?

Because the jdk was just installed, and the jdk already contains a jre.

The JDK environment has been installed here. Now we start to configure the environment variables

2. Configure the environment variables

In terms of Java program development, the two commands of the JDK are mainly used. : javac.exe, java.exe. Path: C:\Java\jdk 1.7.0_09\bin. However, since these commands are not commands of Windows itself,

, so if you want to use them, you need to configure the path.

Get the path:

(1) New->Variable name "JAVA_HOME", variable value "C:\Java\jdk1.8.0_05" (that is, the installation path of JDK)

Step one: Find the JDK file you installed and enter

(2)Edit ->Variable name "Path", add ";%JAVA_HOME%\bin;" at the end of the original variable value

##(3) New -> Variable name "CLASSPATH", variable value ".;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar"

Add environment variables

 

Put these variable values ​​into the system environment variables

The operation is as follows:

First find right-click and enter properties

##Enter Advanced system settings

(1) New -> Variable name "JAVA_HOME",

  Variable value "C:\Java\jdk1.8.0_05" (That is, the installation path of JDK)

 

(2)Edit-----Variable name "Path",

  Add ";%JAVA_HOME%\bin" at the end of the original variable value (each variable value is separated by;)

 

(3) New --- -- Variable name "CLASSPATH",

Variable value ".;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar"

 

 Check whether to add environment variables

Note: If the variable value does not appear, you can re-open the command or shut down and restart

Code writing, run

##This way the environment variables are configured Okay

Finally pay attention to a problem:

If after entering the javac test.java command in CMD, it shows that 'javac' is not an internal or external command, the reason is because the JDK development has not been installed in advance. The environment or environment variables are configured incorrectly.

The above is the detailed content of Configuration and installation of java environment (pictures and texts). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template