Let's talk about: GraalVM download, installation, features, overview


foreword

GraaIVM

High-performance runtime with new compiler optimizations to accelerate Java application performance and lower infrastructure costs on premises and in the cloud

What is GraalVM? Judging from the name, it is VM虚拟机, what are its characteristics? Official summary: High Performance. Cloud Native. Polyglot translates to 高性能、云原生、支持多语言的VM。


解析

1. What is GraaIVM?

  1. GraalVM is a tool for developers to write and execute Java code. Specifically, GraalVM is the Java Virtual Machine (JVM) and Java Development Kit (JDK) created by Oracle. It is a high-performance runtime that improves application performance and efficiency.
  2. The goals of GraalVM include: writing a faster and more maintainable compiler, improving the performance of languages ​​running on the JVM, reducing application startup time, integrating multilingual support into the Java ecosystem, and providing a set of Programming Tools.
  3. GraalVM adds an optimizing compiler to the JDK, which provides performance optimizations for various languages ​​and interoperability for multilingual applications. In addition to supporting Java code, GraalVM also supports other programming languages, including Scala, Kotlin, Groovy, Clojure, R, Python, JavaScript, and Ruby. Essentially, GraalVM allows developers to efficiently run code in multiple languages ​​and libraries within a single application.

Figure 1
insert image description here
Figure 2insert image description here

2. Advantages of GraaIVM

  1. Accelerated JAVA performance : The high-performance JIT compiler generates optimized native code that runs faster, generates less garbage, and uses less CPU
  2. Lower infrastructure cost : No need to change the underlying code, increasing throughput by 8%-11%, greatly reducing server costs
  3. Good JDK support : supports Java8 and Java11, and is committed to Java development: java17, java19+
  4. Compatible with all tools in the Java ecosystem : GraalVM combines the strength of the Java ecosystem and community with more powerful JDK distributions to achieve the best results.
  5. Good framework support : Micronaut, Helidon, Quarkus or Spring Boot for microservices, PicoCLI for command-line applications - no matter what task you face, there is a GraalVM native image compatible framework to make your work easier easy.
  6. Support for multiple programming languages ​​and interactions : In addition to supporting Java code, GraalVM also supports other programming languages, including Scala, Kotlin, Groovy, Clojure, R, Python, JavaScript, and Ruby.

来自菜鸟的第一次英文翻译,希望大家勿喷共勉。

3. Install GraaIVM

1. GraaIVM Community version简略

The code is as follows (example):

2. Download

Download the community version here,
and then select the GraaIVM version according to the JDK version, because I use it JDK17.0.5;
check the JDK version
win + RInput: cmdInput:java -version
insert image description here

So download GraaIVM 22.3

insert image description here

Navigate to the GraalVM Releases repository on GitHub. Select Java 11
based or Java 17 based distribution for Windows, and download. 网站原文

The link jumps to Github, the download is very slow,
insert image description here
it looks like this after downloading

insert image description here

3. Unzip

Change the directory to the location where you want to install GraalVM, then move the .zip archive file to it. 网站原文
Unzip the archive to your file system 网站原文

insert image description here

4. Configuration variables

There can be multiple JDKs installed on the machine. The next step is
to configure the runtime environment. Setting environment variables
via the command line will work the same way for Windows 7, 8, and 10. 网站原文

Point the PATH environment variable to the GraalVM bin directory 网站原文

4.1. Change JAVA_HOME to the location of graalvm

insert image description here
Because I am configuring to switch multiple JDKs here, it may be different from yours (if you want to switch, please jump )

4.2, edit path

如果之前安装过jdk,为了防止不必要的麻烦,直接将标记的变量放在第一位
insert image description here

5. View

win + Rinput: cmdinput:java -version
insert image description here

success


Summarize

Reminder: I am very good, please bear with me, I will work hard:

When water accumulates, fish gather, and when wood grows, birds gather.

Guess you like

Origin blog.csdn.net/aaxzsuj/article/details/128159377