Java know how much (5) Build Java development environment

Source: Internet
Author: User

For Java development, you first install the JDK (Java Development Kit,java Development Toolbox).

The JDK is a collection of tools that are necessary to compile Java source code, run Java programs, such as JVMS, base class libraries, compilers, packaging tools, and so on. No matter what kind of Java application Server is built in a version of the JDK, so mastering the JDK is the first step to learn Java.

Some of the tools provided by the JDK:
    • java compiler: Javac.exe
    • Java Interpreter: Java.exe
    • Java Document generator: Javadoc.exe
    • Java Debugger: Jdb.exe

The Java version mentioned above actually refers to the version of the JDK.

The most mainstream JDK is the JDK released by Sun, and in addition to sun, many companies and organizations have developed their own JDK, such as the JDK developed by IBM, the jrocket of BEA, and the JDK developed by the GNU organization, among others. IBM's JDK contains a JVM (Java Virtual machine) that runs much more efficiently than the JVM contained in the Sun JDK, and is designed to run Jrocket on the x86 platform and is much more efficient on the server than the Sun jdk, but anyway. The Sun JDK needs to be mastered first. JDK download JDK has a different version (J2SE, Java, J2ME), beginners, generally choose J2SE. The J2SE is: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Open the URL and you'll see a page like this:
Figure 1 J2se (Java SE) download page
Download the JDK to accept the corresponding terms, default is not downloadable.

Select the appropriate operating system, click the download link to download. JDK installation Double-click on the downloaded installation package to install, click "Next", appear as shown in the interface:
Figure 2 Changing the installation directory
You can change the JDK's installation directory according to your habits, but keep in mind that the installation directory will be used later.

As you can see, the JDK contains Java development tools (compilers, packaging tools, etc.), source code (base Class library), and public JRE, all of which are installed by default and are necessary for Java development. Three

Click "Next" to wait for the installation.
Figure 3 Installing
After the JDK installation is complete, you will be prompted to install the JRE as shown in:
Figure 4 whether to install the JRE
The JDK already contains the JRE, no need to install again, click "Cancel".
Figure 5 Confirm cancellation

Figure 6 Completing the installation
Click "Close" to complete the installation. Setting environment variables If you do not understand the concept of environment variables, please click here: what is an environment variable

Enter the environment Variable configuration window, in "User variables", set 3 properties, Java_home, PATH, CLASSPATH (case does not matter), if already exist then click "Edit", not exist then click "New":
    • Java_home: Set the installation path for the JDK (such as D:\Program files\jdk1.7.0_71), this path includes folders such as LIB,BIN,JRE (this variable is best set because Tomcat is run later, Eclipse and so on need to rely on this variable).
    • Path: Allows the system to identify JAVA commands under any path, set to:%java_home%\bin. %java_home% is a reference to the Java_home variable specified earlier.
    • Classpath:java Run Environment Load class path, only class in CLASSPATH, can be recognized and loaded, set to.; %java_home%\lib (Note the preceding dot (.), the dot indicates the current path).

Open a CMD window, enter "Java-version" or "javac" command, see a lot of information, proof has been installed and configured successfully. Eclipse is installed with the JDK, you can compile Java source code, run Java programs, but there is no coding editor, no version management tools, it is not easy to manage the project files, can not work with the team. Install eclipse so you can do the work.

Eclipse is a Java integrated development environment (IDE). There are many Java Ides, free of charge, English, Chinese, multi-lingual, eclipse is the most common one, and most of the employees of IT company use Eclipse.

Eclipse Open source Free, the largest number of users, providing a rich plug-in and friendly editing interface, resource consumption is relatively low, faster, itself is developed in Java.

Note: Be sure to set environment variables, and Eclipse's run depends on these environment variables.

The Eclipse is: http://www.eclipse.org/downloads/

Open the link and see the following page:
Figure 7 Eclipse Download page
Select the red box-up version and download it.

Eclipse is free to install, you can extract the downloaded compressed files to any directory, you can also change the directory at will. The first time you start Eclipse, you will be asked to set the default project directory, which you can set only once or every time you start.

Figure 8 Setting up the project catalog
Click "OK", Eclipse will launch successfully, pop-up Welcome screen. Install the Simplified Chinese Language Pack eclipse is in English by default, and if your English is weaker, you can install the Simplified Chinese Language pack. However, I suggest you use the English version, as a programmer, you definitely need to improve your English level, a lot of technical documents are in English, as long as perseverance, will soon improve your English reading ability.

The language pack is: http://www.eclipse.org/babel/downloads.php

First look at the version of Eclipse that you are currently installing. In the Eclipse menu bar, select "Help--about eclipse" to bring up a dialog box:
Figure 9 Viewing the eclipse version
Open the link, scroll down and download the corresponding version of the language pack:
Figure 10 The corresponding version of the language pack
Go to the download page to find the Simplified Chinese Language pack:
Figure 11 Chinese Language Pack
This contains the Eclipse software itself and its modules and plug-in Language pack, you can download all at once, or you can download it when needed, the red box is the Eclipse software itself in the Chinese package, we need to download it.

Unzip the downloaded file and get a folder called Eclipse, which contains two folders: Features and plugins, copy features and plugins to your Eclipse installation directory, overwriting the original program files.
Figure 12 Overwrite the original file
Restart Eclipse and finish, you can enjoy the Chinese version of Eclipse. Series Articles:

Java know how much (1) Language overview

Java know how much (2) virtual machine (JVM) and cross-platform principle

Java know how much (3) employment direction

Java know how much (4) the difference between J2SE, Java EE, J2ME

Java know how much (5) Build Java development environment

Java know how much (5) Build Java 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.