- Native Image
- Build Configuration
- Tracing Agent
- Native Image Compatibility and Optimization Guide
- Class Initialization in Native Image
- Static Native Images
- Native Image Options
- Native Image Hosted and Runtime Options
- Native Image C API
- Implementing Native Methods in Java with Native Image
- LLVM Backend for Native Image
- Debug Info Feature
- Points-to Analysis Reports
- Using System Properties in Native Images
- Profile-Guided Optimizations
- Memory Management at Image Run Time
- Generating Heap Dumps from Native Images
- Native Image Maven Plugin
- JDK Flight Recorder with Native Image
- JCA Security Services on Native Image
- Dynamic Proxy on Native Image
- Java Native Interface (JNI) on Native Image
- Reflection on Native Image
- Accessing Resources in Native Images
- Logging on Native Image
- URL Protocols on Native Image
- Native Image ARM64 Support
- GraalVM Updater
- Embedding Reference
- Polyglot Programming
- Java Reference
- Java on Truffle
- LLVM Languages Reference
- Python Reference
- Ruby Reference
- R Reference
- WebAssembly Reference
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
Supported and Enabled by Default #
These are protocols that are enabled by default and added to every generated native image.
resource are the only supported URL protocols, enabled by default.
Supported and Disabled by Default #
These are protocols that are supported but not enabled by default when building a native image.
They must be enabled during the native image building by adding
--enable-url-protocols=<protocols> to the
The option accepts a list of comma-separated protocols.
The rationale behind enabling protocols on-demand is that you can start with a minimal image and add features as you need them.
This way your image 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
HTTPS Support #
Support for the
https URL protocol relies on the Java Cryptography Architecture (JCA) framework.
https will add to the generated image the code required by the JCA, including statically linking native libraries that the JCA may depend on.
See the documentation on security services for more details.
Not Tested #
No other URL protocols are currently tested.
They can still be enabled using
--enable-url-protocols=<protocols>, however they might not work as expected.