Java operating mechanism and environment building--Learning Java Induction (1)

Source: Internet
Author: User

As the saying goes, 工欲善其事 its prerequisite. To learn automation must first learn programming.
Two months ago Contact Appium Automation framework, one months ago began to understand this truth, now finally busy, there is time to start the system of learning, because have learned Java, so the next time to start Java learning it. Want to learn Java with me to study the discussion, hope that the great God passed the guidance criticism, writing level really limited, please forgive me.
First, skip over the historical background of Java. Go straight to the chase.
Take a look at the Java program's operating mechanism


A. java file is a file that is a suffix of a Java program, just like the suffix name of a Word document is. doc. Java program people can read, but the machine only know the binary encoding, so javac.exe is used to compile Java program into a machine can read the binary files, that is, the. class file. Then use the Java.exe tool to run on the Java Virtual Machine (JVM), the Java VM, and then you can see the results you want. The following is a diagram of the operating mechanism of the JVM:

The above JAVAC.EXE,JAVA.EXE,JVM tools are integrated into the Java development package, the JDK (Java Development Kit). The JDK also contains Java development tools and a running environment JRE (Java Runtime Environment), and the JVM virtual machine is inside the JRE.
JDK installation package from a Baidu, a search a lot, under Windows is an. exe file, like QQ, has been the next step.
After the installation is complete, open the JDK package. The following files will be found:

Because the Bin folder contains all the tools, to execute the Java program, you have to run to the Bin folder where the path to open the cmd command execution. will be particularly troublesome, so we need to configure the environment to execute Java programs in any directory.
First turn on the computer → properties → advanced system settings → advanced → environment variables. The main configuration is three environment variables:
Java_home: Where to find the path to the JDK installation, if it is the default installation, configurable (C:\Java\jdk1.7.0) (assuming my JDK is 1.7.0 version)
Path: Where to look for tools such as compile or run (must be set), config (%java_home%\bin;%java_home%\jre\bin;)
Classpath: Where to find the class file that needs to be run (Java5 start not set), configure (.; %java_home%\lib;%java_home%\lib\tools.jar (Note that there is a point at the front))
After the configuration, whether in the CMD, or directly with the tools, such as Eclipse,editplus can begin to write Java program, think of a little excited about it. Take a look at the simplest program.


You get the final result is definitely "I rule! ”
The specific analysis of each character, after which I learned first one by one induction.
Get here first. I'll go to the bottom of the study.

Java operating mechanism and environment building--Learning Java Induction (1)

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.