- Latest (GraalVM for JDK 21)
- Dev Build
- GraalVM for JDK 21
- GraalVM for JDK 20
- GraalVM for JDK 17
- GraalVM 22.3
- GraalVM 22.2
- GraalVM 22.1
- GraalVM 22.0
- GraalVM 21.3
- Getting Started with Native Image
- Native Image Basics
- Build Overview
- Reachability Metadata
- Optimizations and Performance
- Debugging and Diagnostics
- Dynamic Features
- Accessing Resources
- Certificate Management
- Dynamic Proxy
- Java Native Interface
- JCA Security Services
- URL Protocols
- Interoperability with Native Code
- LLVM Backend
- Workshops and Labs
URL Protocols in Native Image
URL Protocols in Native Image can be divided into three classes:
- supported and enabled by default
- supported and disabled by default
- HTTPS support
URL Protocols that are supported and enabled by default will be included into every generated native binary.
resource are the only supported URL protocols enabled by default.
There are URL Protocols that are supported but not enabled by default when building a native binary.
They must be enabled during build time by using the
--enable-url-protocols=<protocols> option on the command line.
The option accepts a list of comma-separated protocols.
The rationale behind enabling protocols on-demand is that you can start with a minimal binary and add features as you need them.
This way your binary will only include the features you use, which helps keep the overall size small.
https are the only URL protocols that are supported and can be enabled on demand.
They can be enabled using the
--enable-https command-line options.
HTTPS Support #
Support for the
https URL protocol relies on the Java Cryptography Architecture (JCA) framework.
https will add the code required by the JCA to the generated binary, including statically linked native libraries that the JCA may depend on.
See the documentation on security services for more details.
No other URL protocols are currently tested.
They can still be enabled using
--enable-url-protocols=<protocols>, however they might not work as expected.