Java Development environment

Source: Internet
Author: User

1.Java compilation process

The Java source file (. java) is compiled to generate a bytecode file (. Class), which is then handed to the JVM to load and run the. class file.

Java officially provides a different platform for the JVM, as long as the standard. class files can be run on different platform JVMs, running the same effect, so that the implementation of "compile, run everywhere."

1.1 Java compile time and run time

Compile time:. Java source files are compiled with the Javac command (Java compilation period) to generate a. class bytecode file.

Runtime: The JVM virtual machine loads the. Class bytecode file and runs the. Class bytecode file.

1.2 noun explanations

JVM: (Java virtual machines) Java VM

Used to load the. class and run the. class.

JRE: (Java Runtime Environment) Java Runtime Environment

The Jre=jvm+java System class library, in addition to the environment that contains the JVM that is necessary to run the Java program.

JDK: (Java Development Kit) Java Development Toolkit

In addition to including the JVM and the JRE contains the command tools necessary to develop Java programs, jdk=jre+ compile, run, and other command tools.

The minimum environment for running Java programs is the JRE, and the minimum environment for developing Java programs is the JDK.

1.3 Environment Variables

Java_home: The installation path that points to the JDK;

PATH: Executes the bin directory under the JDK;

CLASSPATH: Represents the search path for a class, general shorthand "." ;

1.4 Java Environment Configuration

1.4.1 Download JDK

can go to www.oracle.com official website to download, such as: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

1.4.2 Installing the JDK

Double-click to install the following steps:

When the installation is complete, click Close.

1.4.3 Configuring environment variables

1) Configuration Java_home

    • Right-click My Computer---Properties---advanced system settings---environment variables---new---under System variables fill in variable names and variable values
    • New java_home: Point to JDK installation path, this is D:\JDK

2) configuration Classpath

    • New classpath: Under which paths can find the classes and packages required by the program, generally set to:.
    • 3) Configure path
    • Edit path: A variable that points to the path of the application EXE file, double-click the existing path variable, add the bin under the installation path, pay attention to; separate, this is D:\jdk\bin.

1.4.4 test is configured successfully

    • You can run java-version to see if it runs successfully

Installation configuration is successful!

Java Development environment

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.