A preliminary understanding of 01.java and the first Java program

Source: Internet
Author: User

Java is broadly divided into three categories
1.Javase Desktop Applications
2.JAVAEE Enterprise Applications
3.Javame Smart Terminal Note: Javame has been eliminated.

First, Java development
Java was launched by Sun in 1995 and was acquired by Oracle in the 2010 years after its inception.
The dissemble is added Wow, logo like a cup of coffee, meaning delicious coffee, Java programming like a cup of delicious coffee.

Second, Java features
Java is an analytic programming language, can not directly manipulate the computer, need to install Java Virtual machine, Java source code compiled after the formation of bytecode, through the virtual machine issued instructions to operate the computer.
It is because of the existence of Java Virtual machine that the development of Java language is a cross-platform programming language.

Third, the Java related concept of virtual machine installation
Jdk:java compiling and running the environment
Jvm:java virtual Machines
Jre:java Operating Environment

1. Download JDK
JDK Download Link: www.oracle.com

2. Installing the JDK
Unzip the downloaded JDK, click Install, tick the development tools. Click Next to install.

Four, the environment variable configuration.

1, only need to put your JDK bin directory to the PATH environment variable, java_home and classpath These two can not be configured completely!

2. After the environment variable configuration is complete, go back to your computer desktop Press Windows+r key to open the run, enter CMD in the inside and enter, and then input Java, shown as follows, prove that Java development tools installed successfully

Iv. Write your first program.
On your desktop to create a new text document, called Hello.java, remember to display the status of the suffix to be created, after the creation of a good, start writing! You can copy the content.

After writing, you open the CMD console, enter Javac inside, then a space, drag you this file into, enter! As follows

He will create a hello.class file in your file clip, and finally you use CMD, enter Java, space in it, drag your class file in, and then delete the last. class suffix and then enter the first program to run successfully!

The Java compilation and execution process is as follows:
Program source code Javac compile a class file and then compile the class file with Java to display the results
JVM virtual machine included in JDK so just download one jdk. A JVM virtual machine with its own

Things to note When writing code in Java:
1: Each write a piece of code press Ctrl+s Save to develop this habit
2: Code symbol groups are not half-width
3: Case Sensitivity
4: Name to be followed by the letter can be a number before the end
5: File name and code name must be consistent

CMD inside the operation:
Cd enters the main drive letter
cd/Home Directory
Cd.. Top level Directory

A preliminary understanding of 01.java and the first Java program

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.