Java Development Environment Building

Source: Internet
Author: User
Tags word wrap

First, JDK

JDK (Java Development Kit) is the Java Language Software Development Kit (SDK).

    • Download on the Oracle website (http://www.oracle.com).
    • The latest version of the current (20140625) JDK is the latest version of 8u5.
    • Version selection according to the operating system select the appropriate version, here only to demonstrate the selection of JDK7.
    • The installation process installs directly next ...

Second, environment variables

In the My Computer---Right-click Properties---Advanced tab---Environment variables, set the Java system variables.

    • Create a new environment variable named "Java_home", with the value of the JDK installation directory, for example: C:\Program files\java\jdk1.7.0_07
    • Create a new environment variable with the name "CLASSPATH", the value of the variable is:.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;
    • Edit the path system variable to%java_home%/bin; In addition,%java_home% is applied to existing variables, and each path in path is separated by semicolons.

      after setting the environment variable, test it and enter: java–version at the command prompt to display the version of the JDK installed.

Three, common editor

1. Notepad

Now it's time to test the program, first with Notepad.

New text file, enter the following, save to the appropriate location, the file name is Hello.java, for example: D:\code\Hello.java.

Then enter the following command at the command prompt:

Program output correctly: Hello world!

2, EditPlus

Using Notepad to test whether the JDK installation program is also possible, if you write a program, you have to have several hand-called editor.

EditPlus is a powerful text editor. With unlimited Undo/redo, English spelling checker, word wrap, column number tagging, search substitution, simultaneous editing of multiple files, full screen browsing, the ability to monitor scrapbooks, to sync to a scrapbook to automatically paste text into EditPlus's editing window, or to edit HTML pages.

EditPlus Configure the Java execution Environment process as follows:

To create a new custom tool group:

    • Tools---Configure custom tools to open the Customize tool configuration interface.
    • Click the "Group name" button on the right side of the panel to change the text "Group1" to "JAVA", the group name can be filled in.

To add a compile feature:

    • Click "Add Tool" button, select "Program", create "new program", select it.
    • The contents of "menu text" are changed to "JAVAC", which can be filled in freely.
    • "Command" to fill in the compiler "Java.exe" path, you can browse to find, such as: "C:\Program files\java\jdk1.7.0_07\bin\javac.exe", if you have the correct environment variables, you can directly fill out "Javac".
    • "Parameters" to fill in, click on the right drop-down button, select "File name", which is displayed as "$ (FileName)" can be directly written.
    • "Start directory" fill in, click the right drop-down button, select "File directory", displayed as "$ (filedir)", you can write directly.
    • Select the Capture output check box to enable EditPlus to capture console output.

The above configuration process is to simulate the JAVAC compilation process: Javac Hello.java

To add an execution function:

    • Click "Add Tool" button, select "Program", create "new program", select it.
    • The contents of "menu text" are changed to "JAVA" and can be filled in freely;
    • "Command" to fill in the compiler "Java.exe" path, you can browse to find, such as: "C:\Program files\java\jdk1.7.0_07\bin\java.exe", if you have the correct environment variables, you can directly fill in "java."
    • "Parameters" fill in, click on the right drop-down button, select "File name", that is, "$ (Filenamenoext)", you can write directly.
    • "Start directory" fill in, click the right drop-down button, select "File directory", displayed as "$ (filedir)", you can write directly.
    • Select the Capture output check box to enable EditPlus to capture console output.

The above configuration process is to simulate the JAVAC compilation process: Java Hello

To configure the output mode:

The output mode uses regular expression matching to capture console output information, such as capturing compilation error information and quickly locating the file and location of the compilation error. EditPlus built-in common output matching mode, directly select "JAVA/GCC" can be.

After this configuration, a compilation error occurs, so long as you double-click the error message, you can quickly locate the wrong location.

Template files, syntax highlighting files:

Syntax highlighting file: JAVA.STX; This allows syntax highlighting to be supported by opening the Java source file.

Auto-complete file: JAVA.ACP; When you edit a Java source file, enter the defined keyword to automatically enter the associated content.

These two files can be downloaded to https://www.editplus.com/.

The custom tool selects "JAVA" that was previously configured.

Template files:

Template file: A template for creating a new Java file that defines templates for commonly used code, so that when you create a new Java file with EditPlus, you open a secondary

The time of the repeat input is omitted.

Iv. Common Ides

Eclipse

NetBeans

IntelliJ idea

MyEclipse

Java Development Environment Building

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.