[Java SE] how to install JDK and configure the Java Runtime Environment, JDK Java

Source: Internet
Author: User

[Java SE] how to install JDK and configure the Java Runtime Environment, JDK Java
Abstract: no matter how hard it is to be used as a Java code farmer or a high-end Java System Architect, if JDK is not installed or the Java Runtime Environment is configured, it will be difficult, you cannot write subsequent Java code. Of course, if you are a fan of the Myeclipse compiler, you can directly click the × in the upper right corner and give me a big contempt. If you are using a dos black box to compile Java code, we hope that the following content will bring you into the new world of Java.Preparations:

1. JDK (if you choose a version, you will have your own opinions. I prefer version 1.8 or later. Some people like version 1.6 or version 1.7 is beyond review, but the technology is improving, it's okay to accept new technologies earlier)

2. A pair of bright eyes and obedient hands.

 

If you don't talk much about it, go to the topic.

1. JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.

  

2. Click Accept License Agreement to download the JDK suitable for your computer. Because my computer is Windows 10 64-bit Professional Edition, I chose the last one.

  

Click the red Download button. The storage location is determined by yourself, as long as you can find it during installation.

3. Find the installation file and double-click it.

  

4. Next, you will be asked to select the installation directory.

Note: It is best not to select the source installation directory, because you find that the Program Files contains spaces, and errors may occur in compiling java software in the future. At half past one, the problem cannot be found, therefore, we recommend that you install it in other directories. I personally chose to create a new file named Java on drive D, open the Java folder, and create two new folders in it, jdk and jre.

  

5. Go back to the original installation interface and change the installation directory to the new jdk file. Click Next.

  

6. After jdk is installed, the jre installation interface is displayed. Select the installation path to the newly created jre folder.

  

7. click Next. Jdk and jre are installed successfully. Click Close.

  

8. Test whether jdk is successfully installed. Here is a shortcut. Windows + R open the running interface. Enter cmd to open the dossystem.

  

9. Click Run. Enter java. If the following content is displayed, the installation is successful.

  

10. This is displayed when you enter javac. This is because you have not configured the java Runtime Environment. Next, we will teach you how to configure the java Runtime Environment and use the complete java Runtime Environment.

  

 

11. Right-click computer properties to open advanced system settings.

12. Click "advanced" and then "environment variable.

  

13. create a new system variable JAVA_HOME. Set the variable value to D: \ Java \ jdk. (This is the installation path of my jdk. just copy the jdk installation path on another disk)

 

14. Find the Path in your system variable, double-click it, click Edit text, and add it at the end of the variable value; % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin

  

15. create a new system variable CLASSPATH, and enter the variable value .; % JAVA_HOME % \ lib; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar (note that there is a point in front of the variable value, which indicates the current path)

  

 

16. Click "OK" to test whether the following javac can be used. Run the command with the windows + R key, Enter cmd, open the DOS system, and enter javac.

  

17. so far, jdk installation and java Runtime Environment have been completed. eclipse users can start their own programming journey. If you encounter any problems in configuring environment variables, you are welcome to leave a message in the comment area.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.