Build Native Java Apps with GraalVM
Build Native Java Apps with GraalVM
Java Going Native in Cloud-native era
About the Book
Use GraalVM to build native Java apps
Table of Contents
-
I Introduction
-
1 Introduction to Native Java Apps
- 1.1 Traditional Java Apps
-
1.2 Cloud-Native Java Apps
- 1.2.1 Container Image Size
- 1.2.2 App Startup Time
- 1.2.3 Memory Consumption
-
2 GraalVM
-
2.1 JIT vs. AOT
- 2.1.1 JIT
- 2.1.2 AOT
- 2.2 Native Image
- 2.3 Limitations
-
2.1 JIT vs. AOT
-
3 Installation
-
3.1 Local Installation
-
3.1.1 Install
- 3.1.1.1 Linux / macOS
- 3.1.1.2 Windows
- 3.1.2 Configure
- 3.1.3 Install Native Image
-
3.1.1 Install
-
3.1 Local Installation
-
1 Introduction to Native Java Apps
-
II Native Image
-
4
native-image
- 4.1 Basic Usage
- 4.2 Fallback Image
- 4.3 Build Output
-
5 Command Line Options
- 5.1 Basic Options
- 5.2 Non-standard Options
-
6 Reflection
-
6.1 Automatic Detection
- 6.1.1 With Constant Names
- 6.1.2 With Non-constant Names
- 6.2 Manual Configuration
- 6.3 Reflection at Image Build Time
-
6.1 Automatic Detection
-
7 Class Initialization
- 7.1 Class Initialization Strategy
- 7.2 Debug Class Initialization
-
7.3 Common Errors
- 7.3.1 Wrong Initialization Stage
-
8 Dynamic Proxy
- 8.1 Automatic Detection
- 8.2 Manual Configuration
-
9 Resources
-
9.1 Resource Files
- 9.1.1 Configuration
- 9.1.2 Debug Resource Registration
-
9.2 Locales
- 9.2.1 Default Locale
- 9.2.2 Include Locales
- 9.3 Resource Bundles
-
9.1 Resource Files
-
10 Memory Management
-
10.1 Garbage Collectors
- 10.1.1 Serial GC
- 10.1.2 Epsilon GC
- 10.1.3 G1 GC
- 10.2 Memory Configurations
- 10.3 GC Logs
-
10.1 Garbage Collectors
-
11 Tracing Agent
- 11.1 Basic Usage
- 11.2 Build Configuration
-
11.3 Advanced Usage
-
11.3.1 Filters
- 11.3.1.1 Filter File
- 11.3.1.2 Caller-based Filters
- 11.3.1.3 Access Filters
- 11.3.2 Trace Files
-
11.3.1 Filters
-
12 Static and Mostly Static Images
- 12.1 Static Images
- 12.2 Mostly Static Images
- 12.3 Container Image
-
4
-
III Developer Guide
-
13 GraalVM Integration
- 13.1 GraalVM SDK
-
13.2 Feature
-
13.2.1
Feature
Interface -
13.2.2 Write Custom Features
- 13.2.2.1 A Simple Feature
-
13.2.2.2 Enable with
--features
-
13.2.2.3 Enable with
@AutomaticFeature
-
13.2.3 Provide Runtime Configurations
- 13.2.3.1 Class Initialization
- 13.2.3.2 Reflection
- 13.2.3.3 Serialization
- 13.2.3.4 Resources
- 13.2.3.5 Dynamic Proxy
- 13.2.3.6 Summary
- 13.2.4 Example
-
13.2.5 Advanced Features
- 13.2.5.1 Feature Inclusion
- 13.2.5.2 Feature Dependencies
-
13.2.1
-
13.3 Substitution
- 13.3.1 Target Class
-
13.3.2 Alias
-
13.3.2.1
@Alias
-
13.3.2.2
@Delete
-
13.3.2.3
@Substitute
-
13.3.2.4
@AnnotateOriginal
-
13.3.2.1
- 13.3.3 Delete
- 13.3.4 Replace
- 13.3.5 Target Element
-
13.3.6 Recompute Field Value
- 13.3.6.1 Target Class
-
13.3.6.2 Kind
-
13.3.6.2.1
Reset
-
13.3.6.2.2
NewInstance
-
13.3.6.2.3
FromAlias
-
13.3.6.2.4
FieldOffset
-
13.3.6.2.5
ArrayBaseOffset
andArrayIndexShift
-
13.3.6.2.6
AtomicFieldUpdaterOffset
-
13.3.6.2.7
Manual
-
13.3.6.2.8
Custom
-
13.3.6.2.1
- 13.3.7 Inject Accessor
- 13.3.8 Inject
-
14 JDK Flight Recorder
- 14.1 Basic Usage
- 14.2 Custom Events
-
13 GraalVM Integration
-
IV Frameworks
-
15 Quarkus
- 15.1 Build Container Images
-
15.2 Native Image
- 15.2.1 Configurations
- 15.2.2 Resources
- 15.2.3 Reflections
- 15.2.4 Class Initialization
- 15.2.5 Dynamic Proxy
- 15.3 Internals
-
15 Quarkus
-
V Tools
-
16 GraalVM Dashboard
-
16.1 Dashboard Data Dump
-
16.1.1 Options
- 16.1.1.1 Dump Path
- 16.1.1.2 Scope of Dump Data
- 16.1.1.3 Dump Format
- 16.1.2 Usage
-
16.1.1 Options
-
16.2 View Dashboard
- 16.2.1 Code Size Breakdown
- 16.2.2 Heap Size Breakdown
- 16.2.3 Points-to Exploration
-
16.1 Dashboard Data Dump
-
16 GraalVM Dashboard
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
80% Royalties. Earn $16 on a $20 book.
We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $12 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them