Zero-basic learning java (1): Build the Java environment and build java

Source: Internet
Author: User

Zero-basic learning java (1): Build the Java environment and build java
 

I. Determine what JDK is and JRE

(1) JDK (JavaDevelopment Kit Java Development Kit)

JDK is provided for Java developers, including java development tools and JRE. Therefore, if JDK is installed, you do not need to install JRE separately.

Development tools: compilation tool (javac.exe packaging tool (jar.exe) and so on

(2) JRE (Java Runtime Environment)

Including the core class libraries required by Java Virtual Machine (JVM Java Virtual Machine) and Java programs. To run a developed Java program, you only need to install JRE on the computer.

In short, it is to use JDK development tools to complete the java program and hand it to JRE for running.

Ii. Download and install JDK

Official Website:

Www.oracle.com

Java.sun.com

Install JDK:

Installation in a silly way. Next step.

Suggestion: do not include Chinese characters or special characters such as spaces in the installation path.

If you are prompted to install JRE, you can choose not to install it.

3. Configure the environment variable path

1. Input javac in the doscommand line and an error message is displayed:

Cause of error: if the program currently executed does not exist in the current directory, windows will find it in the directory specified by an environment variable named path in the system. If not found, the above error message is displayed. So go to the jdk installation path \ bin directory and run javac. The javac parameter prompt is displayed.

2. Configure the environment variable path

Every time a java tool is executed, it is very troublesome to enter the bin directory. Can I execute java tools in any directory?

Based on the principle of finding executable programs in windows, you can define the path of the java tool to the path environment variable, and let the system help us find the program to run.

3. configuration method:

My computer -- properties -- Advanced System settings -- Environment Variables

Edit the path environment variable, add the directory where the java tool is located at the beginning of the variable value, and separate it with ";" and other values.

Open the doscommand line and input javac in any directory. If the javac parameter information is displayed, the configuration is successful.

Shang xuexiang opened the door of java and added the code 858568103. For more information, please wait.

 

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.