[Java] Development environment configuration: JDK configuration and Eclipse installation (1)

A more detailed graphic tutorial for learning Java Xiaobai in 2023  . More personal records.

Step 1: Install JDK

http://www.oracle.com/technetwork/java/javase/downloads/index.html

 Open the website, the default is the download package of the Linux system, select the appropriate version according to the respective system requirements (Linux/mac/win), this tutorial takes the mainstream win10 64-bit as an example:

 Select the x64 Installer . (exe ending) file to download and open:

 Choose a good path during installation ( be sure to remember the path !!! It will affect the configuration efficiency of subsequent environment variables )

Step 2: Configure environment variables

After the installation is complete, right-click My Computer--Properties--Advanced System Settings--Environment Variables ;

 

Set variable parameters

 In " System Variables " , you need to set 2 properties (the older version says 3 items: JAVA_HOME PATH    CLASSPATH )       

However, CLASSPATH is not required to be configured . Versions after jdk6 do not need to be reconfigured and are not recommended . Java can still be used normally and can be practiced by yourself.

Variable name 1 : JAVA_HOME

 The selected document path contains the above.

 Variable value: C:\Program Files (x86)\Java\... (If it is the default path, it is likely to be in the location of the C drive)        // Configure according to your actual path (remember the importance of the path! Don’t make a mistake !)

Variable name 2 : CLASSPATH (old version needs to be configured, can be ignored)

variable:

.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar

  (can be copied directly)

  

Variable name 3 : PATH ( PATH not in the system variable needs to be created manually )

variable:

%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

(can be copied directly)

Note: In Windows 10 , the Path variable is displayed in sections. We need to add %JAVA_HOME%\bin %JAVA_HOME%\ jre \bin   separately, otherwise it will not be recognized: 

 Step Three: Test

Press win+R on the keyboard to invoke the command character, enter cmd and press Enter;

Enter javac and press Enter,

And java , java -version ( note that there is a space after java in java -version )

 

 The above pop-up indicates that the JDK environment configuration is complete . (you can exit here)

If popup' is not recognized as an internal or external command, operable program
or batch file. ' means that the installation of the environment failed, and it is necessary to recheck the steps or the configuration of the environment variables for errors.

Next: Open source, Java-based extensible development platform Eclipse installation tutorial [Java] Development environment configuration: JDK configuration and Eclipse installation (2)_This blog I don't know-CSDN blog

Guess you like

Origin blog.csdn.net/m0_73964392/article/details/129393142