Java development environment jdk installation verification 2023 new

I haven't written anything for a long time, and I can't find the old account.

Chatting with a doctor, she recommended some medical materials to me. By the way, I talked about the topic of sharing after reading something, and I agree with her point of view. I haven't written for a long time, and I plan to write something.

Recently, I need to see people's java, and I picked it up to install the java environment. I found that the new version of jdk20 does not need to be equipped with environment variables, which is great.

Make a note of the jdk installation, version 20.

-------------------------------------------------------------------

JDK is a Java development tool suite, and JDK includes three parts: Java virtual machine, Java basic class library, and Java tools.

Speaking of these, let me mention that Java often involves the three concepts of JDK, JRE, and JVM. JDK is the abbreviation of Java Development ToolKit, JRE is the abbreviation of Java Runtime Environment, and JVM is the abbreviation of Java Virtual Machine. JDK is a development kit, JRE is a running environment, and JVM is a virtual machine. Their relationship is JVM<JRE<JDK, JVM+java basic class library=JRE, JRE+java tool=JDK. So installing JDK can solve these.

1. jdk installation

Download address: Java Downloads | Oracle

1. I use the window version of jdk20, the x64 Installer is the installation exe, select the default directory, and install it all the way.

Select the default directory, and the jdk20 folder will be generated under C:\Program Files\Java after installation.

 

(After the installation, I went to the window environment variable to look at it, and found that the path had been automatically filled in, and I was a little surprised. The default installation directory selection will form a jdk20 folder under C:\Program Files\Java. But the environment variable The path configuration will point to C:\Program Files\Common Files\Oracle\Java, here is a shortcut to javapath, which is automatically generated by the program during installation.)

Two, jdk test

After installation, verify whether the installation was successful. The inspection method is as follows:

Enter cmd in the search box next to the windows system icon to enter the command prompt. In the command prompt window, directly enter java and press Enter, and the following prompt is displayed.

Or run java -version to display the version number. Indicates that the installation was successful.

At this time, the command line can compile the java file

For example, write hello.java, cd to the file directory in the command line, and run javac hello.java to complete the compilation.

Run java hello from the command line

Guess you like

Origin blog.csdn.net/shenxianyiya/article/details/130755598