Installation and setting of Java development environment

Source: Internet
Author: User

1.JDK Installation

Download JDK 5.0 Update 5: This includes the JRE execution environment and the JDK development environment, and the version will be updated continuously, so it may be different. After entering, you must select Accept to download.

Then select the installed operating system, sequentially windows,linux,solaris ... such as

Install after download (recommended for installation in C:\Java)

2. Set System variables (for Windows)

"New" in system variables, where "variable name" is set to java_home,"variable value" set to the JDK folder under the directory you just installed (for example: C:\Java\jdk1.5.0_05)

Then, in the original "system variables" to find path"edit", the "variable value" at the top of the Add.; %java_home%\bin; (Note that there is a point in the front, the semicolon should not be missed) so it is done.

3. Testing

Under "Command prompt character", hit the Java command, if not appear can not find the instruction, and then the program to test directly.

Copy the following program code into Notepad and save it as Helloworld.java (the file name must be exactly the same because Java is case-sensitive and the file can exist first C: \)

public class HelloWorld {

public static void Main (String args[]) {

System.out.println ("Hello world!");

}

}

Next, under Command prompt character, enter the following instruction

(Switch to the directory where the file is located, for example, C \)

(compilation) Javac Helloworld.java

(Compile OK will produce helloworld.class files)

(execute) Java HelloWorld

Display Hello World!!

So the Java development environment is complete.

Installation and setting of 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.