To achieve this, your Java code needs to be converted to bytecode. As a developer, you need to write only a single code base to execute your program on any platform, meaning both the operating system (Windows, Mac, Linux, etc.) and the hardware (x86, ARM, aarch64, etc). This has been a promise by Java from the start. The JVM acts as a layer between your application and the machine it runs on. What's happening inside the JVMĪs we learned, the Java Virtual Machine (JVM) is part of the JDK, runs our application, and is called a " managed runtime environment." The "managed" part of this term is essential as it means it not only executes the code but handles a lot of extra functionality on top of that. Look at the Azul Core download page for a list of all available JREs. The goal of the JRE was to be used on devices where the application is executed without the overhead of all the tools and was a smaller file to download and distribute.īut with Java 9, modules were introduced, which allow you to build a runtime with jlink that only contains the modules that are needed to run your application and create a runtime that is a lot smaller compared to the JDK and JRE.īecause many organizations still depend on a JRE approach, Azul and other providers still create JREs for newer versions. Until Java 9, each JDK had an accompanying JRE, that contained the same JVM and libraries but only a limited set of tools. jshell: interact with and execute Java code in a Shell terminal.javadoc: to generate HTML pages with API documentation from your Java source files.javac: used to compile your Java classes to bytecode.A set of tools that will help you to create, monitor, and run Java applications, for example:.The libraries you use to develop Java applications are a set of +5000 classes and contain, for example, java.util, java.text, java.nio, java.sql.The JVM = Java Virtual Machine: this is the executable java that runs your application.It is the "source" of everything else.Įach new Java version is a new version of the JDK containing improvements, bug and security fixes, and new or removed tools. The JDK lives at the highest level of the Java ecosystem. The software world is overloaded with abbreviations, which can be confusing and lead to misuse of specific terms, so we first need to understand the difference between the following terms. And the power that it gives to the developer. The real reason for this is not the language itself but the JVM. Java is consistently in the top of most popular languages. What is it exactly, and how does it work? In this article, we want to look at one part under the umbrella: the Java Virtual Machine. It's an "umbrella" that covers tools, runtimes, and even a whole community. Frank Delporte is a Java Champion, Java developer, technical writer at Azul, blogger, author of "Getting started with Java on Raspberry Pi", and contributor to Pi4J.
0 Comments
Leave a Reply. |