Java from getting started to entering the palace (JRE and JDK)

Source: Internet
Author: User


Java is widely used in Android development and enterprise applications and other fields, relying on the perfect portability, good performance and its perfect exception handling mechanism and other characteristics.

So what is portability, if you write a very good code in your home's broken windows7 system, suddenly found that this line of code out of the Windows7 system, such as to the server of Linux, mobile phone Android system, Can not run normally (because each system in the design time to meet the different needs, where the architecture varies greatly, so the incompatibility is affirmative), you have to write code in these systems to run, you have to write for each operating system different code, not only a waste of time, you have to learn the architecture of different systems, There are some things at the bottom of these architectures, which is a painful process, and the Java language allows you to write code once to run on all platforms, and you no longer have to knock out similar code for every system that might run the program, which is portability, It can be understood that you can copy your program from one computer to another computer with a different system, and it will run normally.

  How portability is implemented, this relies on the Java Virtual machine (java   virtual   machine abbreviation JVM ), what is a virtual machine?

It can be understood that it is a computer virtual computer, that is, your computer has a computer, it is by the software virtual out, you can understand that the code you write to run in this virtual computer, if someone for each system is implemented by the same virtual computer, because this computer is virtual out, And it is the same at all times, do you have incompatibilities with the same system programming for the same computer? And Java's maker Sun and various organizations have built this virtual machine for each system, which is the JVM we mentioned.

As mentioned above, Java runs in the JVM (Java Virtual machine), and this hanging JVM exists in the Java Runtime Environment JRE(Java runtime enviroment), the JVM is a subset of the JRE, With this JRE you can run the Java program, a friend who has played my world should know to download a JRE before playing my world, because my world is written in Java code, this JRE is the Java Runtime Environment, and it is the only thing that can run Java programs. If the program is likened to a car, then the JRE is the fuel needed by the car, and it can only be activated if it has it.

We already know how Java can run, how to develop Java programs, this is going to use our JDK, it's all called (Java Development Kit) means Java development tools, It contains some commands for translating Java source code into Java virtual functions, as well as some class libraries (which can be understood as code using some templates, you can't directly command the bottom of the computer to write code, at least Java is difficult, and Java is to invoke these things to achieve the purpose).

This article is from the "11903858" blog, please be sure to keep this source http://11913858.blog.51cto.com/11903858/1862430

Java from getting started to entering the palace (JRE and JDK)

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.