How to configure the Java development environment on a new computer

Source: Internet
Author: User
Tags windows x64

For Java Novice, just start to learn Java, and their own computer has no Java development-related environment, how should be configured?

(Java development environment is also required for Androvin hand)

The first step is to download and install the Java JRE

The JRE (Java Runtime Environment), the Java Runtime Environment, is a collection of environments necessary to run Java programs, including various class libraries.

1, JRE official download;

Http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Click on the Java Word icon on the left:

3, enter the next layer of the page, click Agree "Accept License agreement", and then according to your computer system select the type to download, if your computer is 32-bit download windowsx86,64 bit on the download Windows x64.

If you do not know if your computer is 32-bit or 64-bit, you can tap systeminfo at the command prompt and then find the system type, if x86 represents 32 bits, x 64:64 bits.

General XP is 32-bit, Win7 above the system, there are 32 bits have 64 bits. Here you choose 32-bit to download:

4. When you pop up the Save window, try to place it in a plain English directory and use the system default path when installing.

5, the installation is very simple, the default selection of "Development tools", and then click Next to do so.

The second step is to configure 3 environment variables :

Right-click My Computer, properties, advanced environment variables.

1, the new system variable java_home, the variable value is you install the path of the JRE, such as:C:\Program files\java\jdk1.8.0_51

2, edit the system variable path, path is usually already exist, so you need to select path to edit, add after the value of the variable:; %java_home%\bin;%java_home%\jre\bin

Note that there must be a semicolon in front, separated from the other paths that existed before.

3, the new system variable Class_path, the value of the variable is:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;

Be careful not to ignore the previous "." No.

Finally, open command prompt cmd, type Java, enter. Re-enter Java–version, return. Finally enter Javac–version, carriage return. As long as there is data after each return, it proves successful.

Step three, download and install Eclipse.

Eclipse is a common tool for developing Java projects.

1, search for Eclipse on Baidu, look for Eclipse's official website. http://www.eclipse.org/downloads/

2, go to the download page, see, To download is "Eclipse IDE for Java EE developers", according to your system choose 32-bit or 64-bit.

3. After entering the download page, drag the page to the bottom and select the download link shown below (This is the download link for the Chinese national "Northeastern University").

4. Click "Click here" to start the download now.

5. Pop up the download form. Save the file, unzip it and put it in the full English directory (the entire path of the directory does not contain Chinese).

Fourth step: Modify the Eclipse-initiated configuration file

Eclipse does not need to be installed after decompression, run directly. However, the configuration file needs to be modified to start successfully.

Open Eclipse.ini this file. You can open it directly by double-clicking it, or by using Notepad.

Sometimes the content in this file becomes only a long line, and all the carriage returns change into a small rectangular black square. Then you need to delete the black squares, and then return to this position for a newline.

Make the configuration file appear in this format as shown:

Then change the contents of the OpenFile (the part that draws the red line) to the installation path of your JDK (the directory that begins with the JDK under C:\Program Files\java), such as: C:\Program files\java\jdk1.8.0_51\bin\ Javaw.exe

Save the configuration file.

The fifth step is to start eclipse and you can develop it.

At this point, eclipse can start successfully. The working directory is set by default at startup, and you can set up other directories yourself (preferably a directory in English).

You can also check the following "Use this as the default and does not ask again" to avoid requiring you to reset your working directory every time you start.

Once you are sure, you can open eclipse and develop it. Here's the Welcome page after Eclipse launch.

How to configure the Java development environment on a new computer

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.