Java Development Environment Configuration

Source: Internet
Author: User

Java Development Environment

The Java developement Kit--java Development Kit, or JDK, is a free Java development tool provided by Sun that allows programmers and end users to compile and run Java programs using this tool. The current versions are JDK1.0, JDK1.1, JDK1.2, JDK1.3, JDK1.4, JDK1.5 (J2SE5.0), JDK1.6 (j2se6.0), JDK1.7 (j2se7.0), JDK1.8.

JDK Architecture: JDK

|--Development tools (Tools) Commands: Java, Javac, jar, rmic ...

|--JRE (java Basic operating environment)

|--System API library, System class library

| Standard library of systems, standard API

|--J VM Java Virtual machine

Execution environment for the Java language

Java Development Environment Configuration

After installing the JDK, you cannot use it immediately and you need to set the environment variable:

1) Set Path:d:\java\jdk1.6.0\bin (point to the Bin folder in the JDK with various compilation commands).

2) CLASSPATH: Tell the Java program where to find third-party and custom classes, if the. class file and the class source file are in the same folder, you do not need to configure CLASSPATH, and subsequent packages are required.

Windows: Executing at the command line

Set Classpath=e:\workspace\1304\bin (Staging environment configuration)

Java day02. Demo1

    • Precautions:

E:\ set classpath = c \ (The current path is not found without semicolons)

= . ; C: \; D:\; (Find Classpath First, if none, then find the current path)

C, D two disks have the same name. class file, Classpath is set to D, and the command line window is currently drive letter C, the JVM is now looking for the classpath path, and then the current path is found.

Linux: Executing in console

① Set the CLASSPATH environment variable, pointing to the directory where the package resides, typically the bin directory in the project folder.

② executes the Java package. ClassName (package name must be written).

Export Classpath=/home/soft01/workspace/1304/bin (Temporary environment configuration)

Java day01. HelloWorld

Java-cp/home/soft01/workspace/1304/bin Day01. HelloWorld (two in Unity)

Precautions:

The Windows root directory is a backslash: \

The Linux root directory is a slash:/

Java Development Environment Configuration

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.