"Java 0 Basic Starter Series" DAY1 development environment Building

Source: Internet
Author: User

First, install the JDK

Java's SDK is referred to as the JDK, to its official website to download the nearest JDK.

Http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html

Second, configure environment variables

Java_home Configuring the JDK installation path

PATH to configure the location of the JDK command file

CLASSPATH Configuring the location of a class library file

1. My Computer (right-click)--Properties--Advanced system settings

2. Environment variables--NEW

(1) New variable name "Java_home", Variable Value "C:\Java\jdk1.8.0_144" (that is, the JDK installation path)
(2) Edit, variable name "Path", at the end of the value of the original variable, add ";%java_home%\bin;%java_home%\jre\bin"
(3) New variable name "CLASSPATH", Variable Value ".; %java_home%\lib;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar "

3. Confirm the environment configuration is correct:

In the console, enter the java,javac,java-version command separately, with the compiler information for the JDK as shown below, including information such as modifying the syntax and parameter options for the command.

Java command:

Javac command:

Java-version command:

4. Verify the first Java program under the console:

public class Test {public    static void main (string[] args) {        System.out.println ("Hello world!" );    }}

Write in Notepad, click "Save", and deposit the C packing directory, enter Javac Test.java and Java Test command, you can run the program (print out the result "Hello Java"). Note: Use the cmd command to set the current directory to the Java file directory, for example: CD C:\Users\Administrator\Desktop

At this point, the Java development environment was built successfully.

"Java 0 Basic Starter Series" DAY1 development environment Building

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.