Design environment configuration for Java programs

Source: Internet
Author: User

First, download the main development tools

    • Download of JDK

Www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    • Downloads for Eclipse

http://mirrors.ustc.edu.cn/eclipse/technology/epp/downloads/release/

    • Download of notepad++

https://notepad-plus-plus.org/

Second, the configuration of environment variables

    • Install JDK,

  

The next installation is complete.

    • Configure Java_home

after installing the JDK, we will configure the Java locale variables. Right-click My Computer---Properties---advanced system settings---Select the Advanced tab---Click on the environment variable---in the system environment variable that tap new, fill in the content:java_home for the value: C:\Develop\Java\jdk1.8.0_ 121 (This is actually the path of the JDK installation)

  

    • Configure Classpath

Configuration classpath and configuration java_home are basically the same, creating a new environment variable, such as:

Classpath the corresponding values are:.; %java_home%\lib;%java_home%\lib\tools.jar

  

    • Configure path

When you configure path, you do not need to create a new, in the environment variable, we find, and edit, at the top of the value plus:%java_home%\bin;%java_home%\jre\bin;

    • Verify that the configuration is successful

Win key +r fast open cmd: Enter java-version and javac-version, if the corresponding version of information appears, the configuration is successful. Such as:

  

Expand Knowledge Points:

    • The difference between JVM,JRE and JDK

The Jvm:java virtual machine (also known as the Java language interpreter), used to interpret the Java source code compiled bytecode file, the JVM is related to the platform.

Jre:java the operating environment, the JRE mainly includes the Java Virtual Machine (JVM) and the core class libraries required for the Java program to run. If you just want to run a Java-developed program, you just need to install the JRE.

Jdk:java Development Toolkit, JDK is improved for Java developers, including Java development tools, including the JRE, toolkit including compilation tools (Javac.exe) and packaging Tools (Jar.exe), etc.

    • Why is the JRE included in the JDK?

1th: The development of Java programs, you need to test the program, run to see the effect, so these operations need to have the support of the JRE

2nd: The development tools in the JDK are actually developed in the Java language, packaged as. exe files for ease of use, and cannot be run without the JRE.

    • What is the role of path paths?

When we execute Java programs, we use tools such as Java.exe and Javac.exe. While these tools are in the bin directory, the purpose of configuring path is to tell the system the path to these tools, which can then be invoked directly for use

    • The role of the classpath path

Java program execution, without the class library, and the CLASSPATH path is to configure the path of these class files, so that when the program executes, quickly find.

    • Considerations for CLASSPATH Configuration

The DOS window can set the temporary classpath path: Set classpath = Path, and the benefit is that executing the Java file anywhere without switching the drive letter will be successful. Because the JVM cannot find the Java source file, it will be based on the path of the temporary setting

Design environment configuration for Java 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.