Configuring the Java Development environment under Windows

Source: Internet
Author: User
Tags windows x64

  Learning Java The first step is to configure the local development environment, learning the most basic desktop development, the following Win7 as an example to configure the Java development environment, namely: Jdk+jre+eclipse, the installation of the JDK will default to install the JRE, according to the prompts to install.

First go to the official website to download the appropriate system version of Jdk,:http://www.oracle.com/technetwork/java/javase/downloads/index.html Open link will see the following page:

at this point, click to download the first one, click on the download page, such as:

First select: Accept License Agreement radio button, agree to the agreement, and then click the corresponding version below to download, my is Windows 64-bit, so choose windows x64 behind the Jdk-8u45-windows-x64.exe, download and then double-click the installation program, see:

Click Next, and then select the installation location, according to the prompts to install, basically no settings, the installation process will install the JRE, is the Java operating environment, after a while the installation is complete.

When you're finished, click the Close button.

Now that the JDK and JRE environments are installed, configure the environment variables below to allow the Java commands to execute directly.

Right click on the desktop computer icon, click Properties, open the computer properties interface, you can also click the Start menu, select "Control Panel", click "System" to open, you can also use the Run box, run: Control.exe/name Microsoft.system Open the Properties dialog box, as shown in:

Then click "Advanced System Settings"

Click on "Environment variables" to enter the environment variable settings interface, first remember our JDK installation path, for example, my is C:\Program files\java\jdk1.8.0_45

This depends on your own settings.

For stability we set the system variable in the following column, click the "New" button,

Variable name input: Java_home

The value of the variable is your installation path, I fill it here: C:\Program files\java\jdk1.8.0_45 and then click the OK button.

Do the same for US new variable: CLASSPATH

Variable value:.; %java_home%\lib;%java_home%\lib\tools.jar;%java_home%\lib\dt.jar

It is also emphasized that there is a "." In the front, do not forget.

Then find the path option, which already exists, click "Edit", at last enter:;%java_home%\bin;%java_home%\jre\bin

Now that you have set up, click OK to save all the settings, and then click OK again to exit the system properties.

Now that the environment variable is configured, we can test it, run CMD, enter it separately: Java-version,java,javac can see the results to show that the JDK is installed and configured.

Now you can use Notepad to develop Java programs, but Eclipse is a Java development indispensable IDE, and easy to install, the following steps, first download eclipse,

Download Link:http://www.eclipse.org/downloads/ will see a lot of versions, this is based on the need to download, different versions focus on the development of the object is not the same, we belong to the javase development, is the general desktop application development, in addition to javame suitable for mobile device development, Java EE Enterprise-level development, including the development of Javaweb, this range is very large, and eclipse is very extensible, can use plug-ins to complete the development.

Well, we download it according to the system version, such as:

After the download, the direct decompression release to their designated directory can be extracted into the directory, Double-click Eclipse.exe, the first step to set up a workspace, this time we set up a directory, and then the development of the future is in this directory, the following check box means that the default workspace is no longer asked, according to their own situation tick can be set after entering the software. When you're done, click the OK button to start eclipse

After entering the software, we can build our first Java project, and then click the Green button on the toolbar to run the program, as shown in:

After the above steps, the Java Complete development environment is now configured.

Configuring the Java Development environment under Windows

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.