Java Basics Tutorial 2-Installing and configuring the Eclipse IDE Environment __java

Source: Internet
Author: User
Tags save file java web

The previous article describes how to install the JDK and set environment variables, this article describes how to install Eclipse Ide,ide is the meaning of the integrated development environment. You should have heard of it. Eclipse is a common IDE tool for developers, so to speak, almost all developers use this IDE tool. Of course there are many IDE tools for different development languages on the market, but Eclipse is one of the most used tools, especially Java development, so let's introduce this tool.

Why you should use Eclipse.

A lot of people say, for beginners, only need to use Notepad or notepad++ to write code, preferably without IDE tools. For this view, if it is 0 basic Learning Java, I agree. But if there is a Java foundation, for example, who has not studied Java in the university, the basic computer-related majors have learned, if you want to pick up Java again, I suggest, directly with the Eclipse IDE tools, because simple, convenient and efficient. If you do not use the IDE, for example, I wrote a program, the first step to Javac, the second step to the Java demo to observe the results of the operation. In fact, the first step is to compile the program, and the second step is to run the code. Eclipse brings these two steps together, and you run the program feeling like you're not compiling the code and running the code directly.

One. How to download the Eclise IDE

1. Browser Open

Click Donwload Packages, where we choose to download the installer package instead of clicking on the download online installer. If you download the installation package, the next time the environment is bad, you can unpack again, open another eclipse again, so you do not need to download again.

2. Click Eclipse for Java Developers

Here we download the version of the red circle above, and if we learn Java Web Development later, we will choose to download the Java EE Developers version. Here I click to download the 64-bit version, you need to check whether the machine is 64 bit or 32-bit operating system.

3. Click Trigger Download, save file to local

Two. How to install Eclipse

1. Unzip the downloaded installation package to a folder

The download installation package is a ZIP format file that we need to extract, for example, I unpacked to the desktop. Eclipse is unpacked and can be started without the installation interface and installation process.

2. To copy the Eclipse folder to the D-packing directory, there is this path

3. Double-click Eclipse.exe, open Eclipse, wait for a load to complete, the interface is as follows

Here we install the default and do not modify the workspace path. Click OK, wait a while to welcome the interface

Three. Set Eclipse

1. Create a Java project with a name such as Myfirstproject

Click File-new-java Project

Here we enter the project name: Myfirstproject, here we need to remind, according to the conventions, we have to capitalize the first letter of each word. Then click Nexe and click the Finish button on the next page. The interface is as follows.

If there is no default expansion of the project structure module, click on the red circle position in the above image, and then you can see the following interface

2. Create a new file

Right button src This package, select New-class

Enter the class name HelloWorld and remember the main method of the Shanghong circle.

3. In the newly created HelloWorld file, you can enter the code in the Main method

We enter a print statement that prints Hello World

4. Run Java program

1. You can click on the green Triangle button, a general variety of software, all indicate the meaning of the operation or the beginning.

2). Right-click our Java file, Run-run as Java application

5. Console observation Run results

6. Eclipse some other personalization settings

1 adjust the font and size of the code

The default font is number 10th, and I might think the font size is too small to be adjusted a little bit. Need to click on Preferences under Windows menu

Click Expand All, then find the text font, click the Edit button, and select font number 12th in the new popup.

2) Set the working panel default background color

We write code in the Panel called Work Panel, the default background color is white, some people say mung bean color to protect the eyes good, then we set the green bean color.

Mung bean color code is: #C7EDCC or RGB255 means is: red:204;green:232;blue:207

Click Background color, remove the hook in front of system default on the right, and click on the color above to enter the Add color panel

First click Define Custom Colors, and then on the right RGB input above the number, point to determine, the code to write the background color will become mung bean color

Eclipse related settings are introduced here, later encountered good settings will be raised again. The Java demo for each article in the future is written and run on Eclipse.

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: 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.