Build a Java development environment and build a java Development Environment

Source: Internet
Author: User
Tags windows x64 windows x86

Build a Java development environment and build a java Development Environment
Build a Java development environment and download JDK

To build a Java development environment, you must first download JDK (Java Devlopment Kit, that is, Java Development Kit)

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

Next, we can see the following table. Select Accept License agreementand agree to the Agreement of oracle.(if you do not agree, you cannot download it. Click the. exe file corresponding to Windows to start downloading.

If the JDK version you need is 32-bit or 64-bit, select Windows x86 for 32-bit, and Windows x64 for 64-bit.

(If you are not using a Windows system, you can select the installation package corresponding to your operating system ''~)

After the download is complete, open it and follow the installation instructions to install it step by step. The default installation location is disk C. You can also select another installation path, but remember the installation path !!

Installation Complete ~ Next, configure the environment variable.

Configure Environment Variables

For example, my JDK installation path is C: \ Program Files (x86) \ Java \ jdk-9.0.4

The following uses this path as an example. Please change the JDK path shown in this article to your JDK installation path!

Right-click "this computer", click "properties", and select "Advanced System settings" on the left, as shown in figure

Select "advanced" and click "environment variables", as shown in

In "system variables", You need to configure three variables. If the variable name already exists, edit and add the variable. If the variable name does not exist, create a new one.

① Variable name JAVA_HOME variable value C: \ Program Files (x86) \ Java \ jdk-9.0.4

② Variable name CLASSPATH variable value.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar;

③ Variable name Path variable value % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;

Remember to change the path to your own installation path. Note that there is a point at the beginning of the CLASSPATH variable value ~

Note: % JAVA_HOME % may not be recognized in win10 Path. If the configuration fails, replace % JAVA_HOME % in Path with the variable value of JAVA_HOME.

Example C: \ Program Files (x86) \ Java \ jdk-9.0.4 \ bin; C: \ Program Files (x86) \ Java \ jdk-9.0.4 \ jre \ bin;

Check whether the environment is configured successfully

Press the shortcut key Win + R

Enter cmd in the running window and press Enter.

In the new pop-up window, enter the command java-version and press Enter. the java version (my version is 9.0.4) should be displayed instead of an error, as shown in figure

The input command java or javac should be able to display the help document instead of reporting an error.

The Java development environment is configured successfully ~

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.