Configuring Java environment variables and compiling source programs

Source: Internet
Author: User

Configuring variables for the Java environment

1. Download and install the JDK

2. Right-click on "My Computer" → properties → advanced system settings → environment variable changes:

A: The value of the input variable name (java_home) variable in the new (paste the installation path of the JDK: location)

B: System variable opens path, variable value increases "%java_home%bin/;"

3. Test: Start →cmd→java-version→ carriage return (show JDK version, success)

Write the source program (file name format is Xx.java, start with uppercase) → Compile the source program (Start →cmd→java-version enter →CD paste Xx.java location, enter the Xx.java in which disk (d:) Carriage return Javac Xx.java Enter →xx.class (appearing at Xx.java, bytecode file), run, continue entering Java XX (file name), enter.

Configuring Java environment variables and compiling source programs

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.