In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what is the relationship between jvm and Java, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
What is JVM?
Virtual machine is a kind of abstract computer, which is realized by simulating various computer functions on the actual computer. Java virtual machine has its own perfect hardware architecture, such as processor, stack, register and so on, as well as the corresponding instruction system. The Java virtual machine shields the information related to the specific operating system platform, so that the Java program only needs to generate the object code (bytecode) running on the Java virtual machine and can run on a variety of platforms without modification.
The so-called java virtual machine is a virtual machine. It is a software used to execute a series of virtual computer instructions. Generally speaking, virtual machines can be divided into system virtual machines and program virtual machines. Visual Box and VMare belong to the system virtual machine. They are complete simulations of physical computers, providing a software platform that can run a complete operating system. The java virtual machine is a typical program virtual machine, which is specially designed to execute a single computer program. The instructions executed in the java virtual machine are called java bytecode instructions.
For example, if there are two programs written in Java, a blog system and an e-commerce system running on a server, what is the relationship between the two Java programs, Java virtual machines and servers?
As can be seen from the above picture, the blog system and e-commerce system written by Java are all running on jvm, and the launch of these two Java programs will also launch two JVM instances. JVM is running on the system of the server, the server can be linux system, can be windows system, can be centos system, all kinds of systems can. This is often said that Java is compiled and run everywhere. Maybe this is still not easy to understand, at least when I first started learning Java, I didn't understand what my teacher said. Then I'll talk about my own understanding after work.
Before we run the Java program, we must install jdk first. We install the windows version of jdk in the jdk environment in windows, and the linux version of jdk;jdk used in jdk on linux. We can understand that it is composed of Java programming language, Java virtual machine and Java class library (Java Development kit). The Java program we write can run on the server as long as the server is equipped with a jdk environment. That is, as long as the server is equipped with a jdk environment, we can directly run the packaged Java program jar package compiled by maven or gradle or other tools. I don't need to adapt your windos environment, linux environment or centos environment in the Java program.
The relationship between jvm and Java
What is the relationship between jvm and Java? can jvm and Java only depend on each other? When I first started learning Java, I came into contact with jvm, and I thought so, because jvm is also called Java virtual machine, so I think jvm is specially designed for Java. Java has its own specification for Java, and many different jdk have been derived according to this specification, such as Oracle's jdk,sun 's jdk (sun has been acquired by oracle) IBM's jdk; virtual machine also has its own specification, according to this specification has also derived a variety of different virtual machines, such as: martial arts alliance leader HotSpot virtual machine, small Jasper Mobile Embedded VM, the world's second BEA JRockit/IBM J9 virtual machine and so on. But in April 2018, Oracle Labs released a new virtual machine Graal VM, with the slogan: "Run Programs Faster Anywhere" echoes "Write Once,Run Anywhere" when Java was born. Graal VM is an enhanced virtual machine that can be used as a running platform for "any language". Here, "any language" includes languages based on Java virtual machines such as Java, Scala, Groovy, Kotlin, as well as LLVM-based languages such as C, C++, Rust, etc. Other languages such as JavaScript, Ruby, Python and R are also supported. Graal VM can mix these programming languages without extra overhead, support the mixing of each other's interfaces and objects in different languages, and also support these languages to use native library files that have been written.
Thank you for reading this article carefully. I hope the article "what is the relationship between jvm and Java" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.