Skip to content

Commit

Permalink
[GR-52663] Update documentation for Galahad (JDK23)
Browse files Browse the repository at this point in the history
PullRequest: graal/17176
  • Loading branch information
Bernard Horan committed Apr 7, 2024
2 parents 5ac7e14 + 0b37389 commit 1caef1c
Show file tree
Hide file tree
Showing 80 changed files with 621 additions and 649 deletions.
20 changes: 10 additions & 10 deletions docs/enterprise-overview/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ permalink: /overview/

# Oracle GraalVM

Oracle GraalVM compiles your Java applications ahead of time into standalone binaries.
These binaries are smaller, start up to 100x faster, provide peak performance with no warmup, and use less memory and CPU than applications running on a Java Virtual Machine (JVM).
Oracle GraalVM compiles your Java application ahead of time into a native binary.
The binary is smaller, starts up to 100x faster, provides peak performance with no warmup, and uses less memory and CPU than an application running on a Java Virtual Machine (JVM).

GraalVM reduces the attack surface of your application.
It excludes unused classes, methods and fields from the application binary.
It excludes unused classes, methods and fields from the native binary.
It restricts reflection and other dynamic Java language features to build time only.
It does not load any unknown code at run time.
It does not load any unknown code at runtime.

Popular microservices frameworks such as Spring Boot, Micronaut, Helidon, and Quarkus, and cloud platforms such as Oracle Cloud Infrastructure, Amazon Web Services, Google Cloud Platform, and Microsoft Azure all support GraalVM.

With profile-guided optimization and the G1 (Garbage-First) garbage collector, you can get lower latency and on-par or better peak performance and throughput compared to applications running on a Java Virtual Machine (JVM).
With profile-guided optimization and the G1 (Garbage-First) garbage collector, you can get lower latency and on-par or better peak performance and throughput compared to an application running on a Java Virtual Machine (JVM).

You can use the GraalVM JDK just like any other Java Development Kit in your IDE.

## Key Benefits

Oracle GraalVM's key benefits are:

* **Low Resource Usage**: Java applications compiled ahead-of-time by GraalVM require less memory and CPU to run. No memory and CPU cycles are spent on just-in-time compilation. As a result, your applications need fewer resources to run and are cheaper to operate at scale.
* **Fast Startup**: With GraalVM, you can start your Java applications faster by initializing parts of the application at build time instead of run time, and instantly achieve predictable peak performance with no warmup.
* **Compact Packaging**: Java applications compiled ahead-of-time by GraalVM are small and can be easily packaged into lightweight container images for fast and efficient deployment.
* **Improved Security**: GraalVM reduces the attack surface of your Java application by excluding the following from the binary: unreachable code (unused classes, methods, and fields), the just-in-time compilation infrastructure, and build-time initialized code. GraalVM's closed world assumption prevents your application from loading unknown code by disabling dynamic features such as reflection, serialization, and so on at run time, and requires an explicit include list of such classes, methods, and fields at build time. GraalVM can embed a software bill of materials (SBOM) in your binary making it easier for you to use common security scanners to check your Java application binaries for published CVEs (Common Vulnerabilities and Exposures).
* **Easily Build Cloud Native Microservices**: Popular microservices frameworks such as Spring Boot, Micronaut, Helidon, and Quarkus, and cloud platforms such as Oracle Cloud Infrastructure (OCI), Amazon Web Services (AWS), Google Cloud Platform (GCP), and Microsoft Azure all support GraalVM. This makes it easy for you to build cloud native Java microservices, compiled as binaries, packaged in small containers, and run on cloud platforms - OCI, AWS, GCP and Azure.
* **Low Resource Usage**: A Java application compiled ahead-of-time by GraalVM requires less memory and CPU to run. No memory and CPU cycles are spent on just-in-time compilation. As a result, your application need fewer resources to run and is cheaper to operate at scale.
* **Fast Startup**: With GraalVM, you can start your Java application faster by initializing parts of the application at build time instead of run time, and instantly achieve predictable peak performance with no warmup.
* **Compact Packaging**: A Java application compiled ahead-of-time by GraalVM is small and can be easily packaged into a lightweight container image for fast and efficient deployment.
* **Improved Security**: GraalVM reduces the attack surface of your Java application by excluding the following from the binary: unreachable code (unused classes, methods, and fields), the just-in-time compilation infrastructure, and build-time initialized code. GraalVM's closed world assumption prevents your application from loading unknown code by disabling dynamic features such as reflection, serialization, and so on at runtime, and requires an explicit include list of such classes, methods, and fields at build time. GraalVM can embed a software bill of materials (SBOM) in your binary making it easier for you to use common security scanners to check your Java application binaries for published Common Vulnerabilities and Exposures (CVEs).
* **Easily Build Cloud Native Microservices**: Popular microservices frameworks such as Micronaut, Spring Boot, Helidon, and Quarkus, and cloud platforms such as Oracle Cloud Infrastructure (OCI), Amazon Web Services (AWS), Google Cloud Platform (GCP), and Microsoft Azure all support GraalVM. This makes it easy for you to build cloud native Java microservices, compiled as binaries, packaged in small containers, and run on cloud platforms - OCI, AWS, GCP and Azure.
* **Extend your Java Application with Python and Other Languages**: With GraalVM you can embed languages such as Python, JavaScript, and others to extend your Java application.
* **Use Existing Development and Monitoring Tools**: Your existing Java application development and monitoring tools work with GraalVM application binaries. GraalVM provides build plugins for Maven and Gradle, and GitHub Actions for CI/CD. GraalVM supports Java Flight Recorder (JFR), Java Management Extensions (JMX), heap dumps, VisualVM, and other monitoring tools. GraalVM works with existing Java editors/IDEs, and unit test frameworks such as JUnit.

Expand Down
12 changes: 6 additions & 6 deletions docs/enterprise-overview/solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permalink: /solutions-overview/
## Challenges Faced By Today’s Businesses

Today’s online global enterprises and microservices alike face the same challenges:
achieve better performance, and reduce ever-increasing infrastructure costs.
achieve better performance and reduce ever-increasing infrastructure costs.
The evolution from older, layered architectures to microservices requires new,
innovative approaches to running a business either on premises or in the cloud.

Expand All @@ -20,23 +20,23 @@ online marketplace.
Oracle GraalVM is the foundation for innovation and improvement for both large
enterprise applications and microservices alike.

Built on trusted and secure Oracle Java SE, Oracle GraalVM accelerates
application performance while consuming fewer resourcesimproving application
Built on the trusted and secure Oracle Java SE, Oracle GraalVM accelerates
application performance while consuming fewer resources—improving application
efficiency and reducing IT costs.

In data centers with ever-growing workloads, being able to service more
requests with the same computing infrastructure reduces the need to purchase
additional hardware. Thus Oracle GraalVM's reduction of required compute
additional hardware. Thus, Oracle GraalVM's reduction of required compute
resources can lower capital cost expenditures on premise and lower operation
costs in the cloud.

## Trusted Oracle Support and Updates

Oracle GraalVM customers can take advantage of 24/7 access to the experienced Oracle GraalVM
Oracle GraalVM customers can take advantage of 24x7 access to the experienced Oracle GraalVM
support team who work closely with the Oracle Java support team.

Oracle GraalVM releases include all Oracle Java critical patch updates
(CPUs) which are released on a regular schedule to remedy defects and known vulnerabilities.
(CPUs) on a regular schedule to remedy defects and known vulnerabilities.

### Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ For example:

## Pulling Images

1. To pull the container image for GraalVM JDK for a specific JDK feature version, e.g, _22_, run:
1. To pull the container image for GraalVM JDK for a specific JDK feature version, such as _22_, run:
```bash
docker pull ghcr.io/graalvm/jdk-community:22
```
Expand All @@ -53,9 +53,9 @@ For example:
FROM ghcr.io/graalvm/jdk-community:22
```

You have pulled a size compact GraalVM Community Edition container image with the GraalVM JDK and the Graal compiler pre-installed.
You have pulled a size compact GraalVM Community Edition container image with the GraalVM JDK and the Graal compiler preinstalled.

2. To pull the container image with the `native-image` utility for a specific JDK feature version, e.g, _22_, run:
2. To pull the container image with the `native-image` utility for a specific JDK feature version, such as _22_, run:
```bash
docker pull ghcr.io/graalvm/native-image-community:22
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ Oracle GraalVM container images are published in two OCR repositories: **jdk** a

| Repository | Description |
|------------------|-------------|
| **jdk** | Provides container images with Oracle GraalVM JDK (without the `native-image` utility) which can be used to both compile and deploy Java applications. Image tags let you select the Java version and Oracle Linux version. |
| **native-image** | Provides Oracle GraalVM container images with the `native-image` utility along with all tools required to compile applications into native Linux executables. These images are commonly used in multi-stage builds to compile applications into executables that are then packaged in a lightweight container image. Image tags let you select the Java version and Oracle Linux version as well as variants that include the musl toolchain for the creation of fully statically linked executables. |
| **jdk** | Provides container images with Oracle GraalVM JDK (without the `native-image` utility) which can be used to both compile and deploy Java applications. Use the container image tags to select the appropriate Java version and Oracle Linux version. |
| **native-image** | Provides Oracle GraalVM container images with the `native-image` utility along with all tools required to compile applications into native Linux executables. These images are commonly used in multistage builds to compile applications into executables that are then packaged in a lightweight container image. Use the container image tags to select the Java version and Oracle Linux version as well as variants that include the musl toolchain for the creation of fully statically linked executables. |

Both repositories provide container images for AMD64 and AArch64 processor architectures, with a choice of Oracle Linux versions 7, 8, or 9.

Oracle GraalVM is installed in `/usr/lib64/graalvm/graalvm-java<$FeatureVersion>` where `<$FeatureVersion>` is `17`, `21`, `22`, etc.
For instance, Oracle GraalVM for JDK 22 is installed in `/usr/lib64/graalvm/graalvm-java22`.
Oracle GraalVM is installed in _/usr/lib64/graalvm/graalvm-java&lt;$FeatureVersion&gt;_ where `<$FeatureVersion>` is `17`, `21`, `22`, and so on.
For example, Oracle GraalVM for JDK 22 is installed in _/usr/lib64/graalvm/graalvm-java22_.
All binaries, including `java`, `javac`, `native-image`, and other binaries are available as global commands via the `alternatives` command.

## Tags

Each repository provides multiple tags that let you choose the level of stability you need including the Java version, build number, and the Oracle Linux version.
Oracle GraalVM image tags use the following naming convention:
Oracle GraalVM container image tags use the following naming convention:

```bash
$version[-muslib(for native image only)][-$platform][-$buildnumber]
```

The following tags are listed from the most-specific tag (at the top) to the least-specific tag (at the bottom).
The most-specific tag is unique and always points to the same image, while the less-specific tags point to newer image variants over time.
The most-specific tag is unique and always points to the same container image, while the less-specific tags point to newer container image variants over time.

```
17.0.8-ol9-20230904
Expand All @@ -46,7 +46,7 @@ The most-specific tag is unique and always points to the same image, while the l

## Pulling Images

1. To pull the container image for Oracle GraalVM JDK for a specific JDK feature version, e.g., _22_, run:
1. To pull the container image for Oracle GraalVM JDK for a specific JDK feature version, such as _22_, run:

```bash
docker pull container-registry.oracle.com/graalvm/jdk:22
Expand All @@ -58,7 +58,7 @@ The most-specific tag is unique and always points to the same image, while the l
FROM container-registry.oracle.com/graalvm/jdk:22
```

2. To pull the container image for Oracle GraalVM `native-image` utility for a specific JDK feature version, e.g., _22_, run:
2. To pull the container image for Oracle GraalVM `native-image` utility for a specific JDK feature version, such as _22_, run:

```bash
docker pull container-registry.oracle.com/graalvm/native-image:22
Expand All @@ -76,44 +76,44 @@ The most-specific tag is unique and always points to the same image, while the l
FROM container-registry.oracle.com/graalvm/native-image:22-muslib
```

3. To verify, start the container and enter the Bash session:
3. To verify, start the container and enter a `bash` session:

```bash
docker run -it --rm --entrypoint /bin/bash container-registry.oracle.com/graalvm/native-image:22
```

To check the version of Oracle GraalVM and its installed location, run the `env` command from the Bash prompt:
To check the version of Oracle GraalVM and its installed location, run the `env` command from the `bash` prompt:

```bash
env
```

The output shows the environment variable `JAVA_HOME` pointing to the installed Oracle GraalVM version and location.

To check the Java version, run the following command from the Bash prompt:
To check the Java version, run the following command from the `bash` prompt:

```bash
java -version
```

The output shows the installed Oracle GraalVM Java runtime environment and version information.

To check the `native-image` version, run the following command from the Bash prompt:
To check the `native-image` version, run the following command from the `bash` prompt:

```bash
native-image --version
```

The output shows the installed Oracle GraalVM `native-image` utility version information.

4. Calling `docker pull` without specifying a processor architecture pulls container images for the processor architecture that matches your Docker client.
4. A `docker pull` command that omits a processor architecture pulls container images for the processor architecture that matches your Docker client.
To pull container images for a different platform architecture, specify the desired platform architecture with the `--platform` option and either `linux/amd64` or `linux/aarch64` as follows:

```bash
docker pull --platform linux/aarch64 container-registry.oracle.com/graalvm/native-image:22
```

### Learn More
### Related Documentation

- [GraalVM Native Image, Spring and Containerisation](https://luna.oracle.com/lab/fdfd090d-e52c-4481-a8de-dccecdca7d68): Learn how GraalVM Native Image can generate native executables ideal for containerization.
- [Announcement Blog: New Oracle GraalVM Container Images](https://blogs.oracle.com/java/post/new-oracle-graalvm-container-images)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ permalink: /getting-started/

# Getting Started with Oracle GraalVM

Oracle GraalVM compiles your Java applications ahead of time into standalone binaries that start instantly, provide peak performance with no warmup, and use fewer resources.
Oracle GraalVM compiles your Java application ahead of time into a native binary that starts instantly, provides peak performance with no warmup, and uses fewer resources.

Here you will find information about installing Oracle GraalVM and running basic applications with it.
Here you can find information about how to install Oracle GraalVM and run basic applications with it.

If you are new to Oracle GraalVM, we recommend starting with the [GraalVM Overview](../../introduction.md), where you will find information about GraalVM's benefits, distributions available, supported platforms, features support, and licensing.

If you have Oracle GraalVM already installed and have experience using it, you can skip this page and proceed to the in-depth [reference manuals](../../reference-manual/reference-manuals.md).
## How Can I Get Oracle GraalVM?

You can get Oracle GraalVM by:
- downloading from [Oracle Java Downloads](https://www.oracle.com/uk/java/technologies/downloads/).
- downloading it from [Oracle Java Downloads](https://www.oracle.com/uk/java/technologies/downloads/).
- subscribing to [Oracle Java SE Subscription and Oracle Java SE Desktop Subscription](https://www.oracle.com/uk/java/java-se-subscription/). The subscription includes entitlement to Oracle GraalVM.
- subscribing to [Oracle Cloud](https://www.oracle.com/cloud). Oracle GraalVM is free to use, including support, for Oracle Cloud subscribers.
- subscribing to [Oracle Cloud Infrastructure](https://www.oracle.com/cloud). Oracle GraalVM is free to use, including support, for Oracle Cloud Infrastructure subscribers.

Choose your operating system and proceed to the installation steps for your specific platform:
Installation steps for your specific platform:

* Oracle Cloud (OCI)
* Oracle Cloud Infrastructure (OCI)
* [Code Editor](oci/code-editor.md)
* [Cloud Shell](oci/cloud-shell.md)
* [Compute with Oracle Linux 7/8](oci/installation-compute-instance-with-OL.md)
Expand All @@ -44,7 +44,7 @@ $JAVA_HOME/bin/java -version

Using [GraalVM Native Image](../../reference-manual/native-image/README.md) you can compile Java bytecode into a platform-specific, self-contained native executable to achieve faster startup and a smaller footprint for your application.

Compile this simplest _HelloWorld.java_ application to bytecode and then build a native executable:
Compile this _HelloWorld.java_ application to bytecode and then build a native executable:
```java
public class HelloWorld {
public static void main(String[] args) {
Expand All @@ -61,7 +61,7 @@ native-image HelloWorld
```

The last command generates an executable file named _helloworld_ in the current working directory.
Invoking it runs the natively compiled code of the `HelloWorld` class as follows:
Invoking it runs the natively-compiled code of the `HelloWorld` class as follows:
```shell
./helloworld
Hello, World!
Expand All @@ -73,15 +73,15 @@ Hello, World!

### New Users

Continue to [Native Image basics](../../reference-manual/native-image/NativeImageBasics.md) to gradually educate yourself about the technology.
Continue to [Native Image basics](../../reference-manual/native-image/NativeImageBasics.md) to educate yourself about the technology.
For users who are familiar with GraalVM Native Image but may have little experience using it, proceed to [User Guides](../../reference-manual/native-image/guides/guides.md).

For more information on the Graal compiler, see the [compiler documentation](../../reference-manual/java/compiler.md).
Larger Java examples can be found in the [GraalVM Demos repository on GitHub](https:/graalvm/graalvm-demos).

### Oracle Cloud Users
### Oracle Cloud Infrastructure Users

Oracle Cloud users considering Oracle GraalVM for their cloud workloads are invited to read [Oracle GraalVM on OCI](oci/installation-compute-instance-with-OL.md).
Oracle Cloud Infrastructure users who are considering Oracle GraalVM for their cloud workloads are invited to read [Oracle GraalVM on OCI](oci/installation-compute-instance-with-OL.md).
This page focuses on using Oracle GraalVM with an Oracle Cloud Infrastructure Compute instance.

### Advanced Users
Expand Down
Loading

0 comments on commit 1caef1c

Please sign in to comment.