Java NOTES: Development environment

Source: Internet
Author: User
Tags java se

For more information, see the online anthology: http://android.52fhy.com/java/index.html

Java is a generic term for the Java object-oriented programming language and Java platform introduced by Sun Microsystems Company in May 1995. Co-developed by James Gosling and co-workers, and was formally launched in 1995.

Java consists of three systems:

    • Javase (J2SE) (JAVA2 Platform standard Edition,java platform version)
    • EE (Java 2 platform,enterprise Edition,java Platform Enterprise Edition)
    • Javame (J2ME) (Java 2 Platform Micro Edition,java Platform mini version).

In June 2005, the JavaOne conference was held and Sun disclosed Java SE 6. At this point, various versions of Java have been renamed to remove the number "2": the name of the Java EE, j2se renamed Java Se,j2me to Java ME.

JDK Installation

First we need to download the Java Development Kit jdk,:http://www.oracle.com/technetwork/java/javase/downloads/index.html

This assumes that you are downloading the Jdk-8u101-windows-x64.exe, then after the installation is complete, you need to configure the environment variables:

Environment variables: System variables, Control Panel, advanced system settings

1) Configuration Java_home

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101

The path is your installed JDK home directory.

2) configuration Classpath

classpath=.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

Remember to bring a "." in front of you.

3) Configure path
Directly after the path is added, preceded by a semicolon, used to separate from the original parameters. Do not delete the system already!

;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

4) test, see version indicates successful installation

$ java -versionjava version "1.8.0_101"Java(TM) SE Runtime Environment (build 1.8.0_101-b13)Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Two concepts:

    • JRE(Java runtime enviroment) is the Java Runtime environment. For users of Java programs, not developers. If you download and install only the JRE, your system can only run Java programs. The JRE is the set of environments necessary to run a Java program, including the JVM standard implementation and the Java Core Class library. It includes Java virtual machines, Java platform core classes, and supporting files. It does not contain development tools (compilers, debuggers, etc.).

    • JDK(Java Development Kit), also known as J2SDK (JAVA2 Software Development Kit), is the Java Development Toolkit, which provides a Java development environment that provides tools such as compiler Javac, Used to compile Java files into a class file) and the runtime environment (provides JVM and runtime helper packages for parsing class files to make it run). If you download and install the JDK, you can not only develop Java programs, but also have a platform to run Java programs. The JDK is the core of the entire Java, including the Java Runtime Environment (JRE), a stack of Java tools Tools.jar, and the Java Standard Class library (Rt.jar).

HelloWorld

File name: Helloworld.java

publicclass HelloWorld {    publicstaticvoidmain(String []args) {        System.out.println("Hello World");    }}

Command-line compilation run:

javac HelloWorld.javajava HelloWorld
Eclipse uses

Eclipse is a free, open source Java IDE: https://www.eclipse.org/downloads/eclipse-packages/.
Select Eclipse IDE for Java developers.

Eclipse New Java Project please refer to: http://blog.csdn.net/unix21/article/details/18813173

Common tricks

1, the Eclipse code automatic prompt setting
The Code hints feature in the Eclipse code is turned off by default, only the input "." When the feature is not prompted. Turn on the code auto-prompt feature: Open Content Assist, Editor-----Java---Perferences, Window-----windows, Eclipse, in the bottom right column to find Auto-activati On, here are three options to find the second "Auto activation triggers for Java:" option to see a "." In the text box after it. Exist.

This means: only enter "." Then there will be code hints and auto-completion, and that's where we're going to change. Put the "." In the text box Replace it with "abcdefghijklmnopqrstuvwxyz."

2. Unable to view source code

See: http://blog.csdn.net/u011514810/article/details/53196371

Src.zip is typically in the root directory of the JDK installation, for example C:\Program Files\Java\jdk1.8.0_101 .

Java NOTES: Development environment

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.