Java First lesson

Source: Internet
Author: User

Configuration of the development environment.

    1. Select the corresponding jdk and Eclipse According to the operating system
    2. Configuration of environment variables

(1) My Computer- - Properties -- advanced-- environment variables

(2) New system variable java_home

Variable name:java_home

Variable value: The directory of theJDK , such as d:/java----- open to the directory where the bin appears

(3)

Select an environment variable named "Path" in "System variables"

Double-click the variable to add the absolute path of the bin directory in the JDK installation path to the value of the path variable, separating it with the semicolon of the half-width and the existing path.

Variable name:Path

Added variable value:%java_home%\bin;%java_home%\jre\bin;----- on the front

This is the Java Environment configuration, the configuration is completed directly after the Eclipse, it will automatically complete the configuration of the Java environment

Special Note:jdk and eclipse saved paths cannot have Chinese characters

The process of Chinese:help--install new software...-- add --name+http://download.eclipse.org/technology/babel/ Update-site/r0.13.1/mars--- select third -- Simplified Chinese

the Java language runs:

1. Create a new . Java file and output Hello World!

Class Hello

{

public static void main (string[] args)

{

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

}

}

    1. Compile and run with the command prompt

Javac Hello.java

Java Hello

"Hello world!"

Java First lesson

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.