Installation of java basic -01 environment

table of Contents

What is JDK

JDK download

Install JDK

Set environment variables

Check if the JDK variables are configured correctly


What is JDK

Before downloading and configuring the environment, let's first understand what is JDK?

JDK is the abbreviation of Java Development Kit, which is a product of Sun Microsystems for Java developers.

The JDK contains JRE. There is a directory called jre in the JDK installation directory. There are two folders bin and lib. Here you can think that the bin is jvm, and the lib is the class library required for jvm work. , And the combination of jvm and lib is called jre.

  JDK is the core of the entire JAVA, including the Java runtime environment JRE (Java Runtime Envirnment), a bunch of Java tools (javac/java/jdb, etc.) and Java-based class libraries (that is, the Java API includes rt.jar).

  ①SE (J2SE), standard edition, is a version we usually use. Starting from JDK 5.0, it is renamed Java SE.

  ②EE (J2EE), enterprise edition, enterprise edition, use this JDK to develop J2EE applications. Starting from JDK 5.0, it is renamed Java EE.

  ③ME (J2ME), micro edition, mainly used for java applications on mobile devices and embedded devices. Starting from JDK 5.0, it was renamed Java ME.

JDK download

After understanding these, we can download and configure the JDK next. The download address is: https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html

Here, download the JDK1.8 version, after opening the above link, the interface is as shown in the figure below:

 Underline the interface until the following figure:

My computer is Windows 64-bit, so download the installation package in the red selection box, please download the JDK according to your computer;

After downloading and installing according to the prompts, you can configure the java environment.

Install JDK

Since I have already installed it, I won’t install it again. Just click on the .exe installation package of jdk and follow the prompts to install it (but remember to install the directory yourself, which will be used below)

Set environment variables

Before starting to use Java, we need to set the relevant environment variables and tell the computer where the java installation path is, in order to run the Java program correctly.

The environment variable setting path is:

Win+E to open the folder-------Right-click this computer (or my computer)-------Click Properties------------Advanced System Settings------ --Environmental variables

Make the following changes in the system variable column

New variable 1: JAVA_HOME=D:\java\jdk (the path here is the jdk installation path)

New variable 2: CLASSPATH=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar; (note that there is a dot and semicolon in front)

Append after the existing variable PATH: %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

Check if the JDK variables are configured correctly

Win+R key, enter cmd, press Enter and open the command prompt interface

Enter javac and press Enter. If the following message appears, the JDK environment has been configured

 

Eclipse download and installation

Eclipse is an open source -based Java extensible development platform. On its own, it is just a framework and a set of services for building a development environment through plug-in components.

Download link: https://www.eclipse.org/downloads/

Or Baidu network disk resources: https://download.csdn.net/download/dream_18/15989324?spm=1001.2014.3001.5501

For installation, please refer to: https://blog.csdn.net/xcijy/article/details/82468668?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161631386716780265444026%2522%252C%2522scm%2522%253A%252220140713.130102334.. %2522%257D&request_id=161631386716780265444026&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-2-82468668.first_rank_v2_pc_rank_v29&utm_term=eclipse%E4%E5%E5%E5%F8B%E5% %8A%E5%AE%89%E8%A3%85

 

 

Guess you like

Origin blog.csdn.net/dream_18/article/details/115030519