How-to Build Custom Java Runtimes with Jlink

  Рет қаралды 6,219

Java

Java

Күн бұрын

Jlink is a powerful tool in the JDK for creating custom runtimes based on the modules an application needs to run. In this video, we will introduce the key concepts and benefits of using jlink and go through five steps covering the key features used when creating a custom runtime.
The code used in this video can be found in this Github Repo ➱ github.com/java/samples/tree/...
Chapters
0:00 intro
1:11 Basics of jlink
2:35 Using JDeps
3:43 Adding Non-JDK Modules to an Image
5:25 Adding Explicit Modules to an Image
7:26 Additional Image Customization Options
8:44 Conclusion
Resources
- The jlink Command ➱ docs.oracle.com/en/java/javas...
- jlink tutorial ➱ dev.java/learn/jvm/tools/core...
- Overview of "almost all" Java modules published at Maven Central ➱ github.com/sormuras/modules
- Dev.java ➱ dev.java
- Inside.java ➱ inside.java
Tags #Java #Cloud #OpenJDK #JDK #JVM #InsideJava

Пікірлер: 18
@neoliamonu
@neoliamonu 9 күн бұрын
Please make a video with the build tools: Maven & for Spring Boot Framework
@billykorando6820
@billykorando6820 9 күн бұрын
Ha, kinda figured that would be the response. But good to know there's a demand before committing to the video. 😄
@jfsanchez91
@jfsanchez91 4 күн бұрын
for sure a follow up video with some popular Framework + Gradle/Maven + Docker would be great.
@kembs2k
@kembs2k 8 күн бұрын
Great video. Simple and effective!
@ghostrecon9101
@ghostrecon9101 9 күн бұрын
A Spring boot + maven build process using jlink would be much appreciated, thanx
@bsdooby
@bsdooby 9 күн бұрын
Nice video! Thank you; and I am all in for some more good stuff (mvn, other tools, etc.)
@wrichikbiswas
@wrichikbiswas 9 күн бұрын
Do one on jpackage, please, and how to use jlink together.
@1973Gerhard
@1973Gerhard 9 күн бұрын
+1
@billykorando6820
@billykorando6820 9 күн бұрын
Yea, that is also a natural next step. Will look into that as well.
@JavaCodeShorts
@JavaCodeShorts 3 күн бұрын
Cool!
@aravindpogu
@aravindpogu 9 күн бұрын
Would like to see how we could leverage jdeps and jlink for complex applications like keycloak (with Quarkus runtime).
@subinksoman
@subinksoman 4 күн бұрын
Please make a video with the build tools: Maven & for Spring Boot Framework waiting for it
@philippedeneve3130
@philippedeneve3130 5 күн бұрын
Is there a specific reason to create a jmod file from the foo module before linking it in the jlink image (rather than creating a modularized jar)?
@luisdanielmesa
@luisdanielmesa 8 күн бұрын
One with Maven and also maybe an application server like Glassfish, Payara, etc... Is it possible? I know OSGi might be troublesome.
@billykorando6820
@billykorando6820 7 күн бұрын
I don’t know if covering a bunch of different frameworks makes a lot of sense unless there’s a specific use case. Right now my thinking on the second video would be to cover Spring Boot, where only some of the underlying dependencies are modularized and Helidon, which to my knowledge, all dependencies are modularized. I think from there the benefits and practices should be reasonably replicable across most projects. If there’s the demand, numbers, and concrete examples, might do a third video on specific edge use cases.
@ayushimundra6609
@ayushimundra6609 3 күн бұрын
HI i am getting error while running a simple hello world program Caused by: java.lang.ClassNotFoundException: first.HelloWorld
@philippedeneve3130
@philippedeneve3130 4 сағат бұрын
The classpath argument (-cp) seems to be missing in the example. For your convenience, try executing the following commands: mkdir jlink_example cd jlink_example mkdir -p src/foo mkdir out echo 'package foo; public class HelloWorld{ public static void main(String[] args){ System.out.println("Hello JLink!"); } }' >src/foo/HelloWorld.java javac -d out src/foo/HelloWorld.java jlink --add-modules java.base --output hello-jlink-image ./hello-jlink-image/bin/java -cp out foo.HelloWorld
Java 21 - Language Features and Beyond
29:20
Java
Рет қаралды 15 М.
Project Leyden: Capturing Lightning in a Bottle
45:50
ТАМАЕВ vs ВЕНГАЛБИ. ФИНАЛЬНАЯ ГОНКА! BMW M5 против CLS
47:36
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 104 МЛН
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 20 МЛН
So, you want to be a programmer?
20:43
ForrestKnight
Рет қаралды 151 М.
Stream Gatherers | Java 22 New Feature
16:57
Code Wiz
Рет қаралды 436
Java Runtime Shrink With JLink!
4:39
Tom Gregory Tech
Рет қаралды 6 М.
Modern Java in Action
50:32
Java
Рет қаралды 33 М.
It’s time to move on from Agile Software Development (It's not working)
11:07
This Zsh config is perhaps my favorite one yet.
17:24
Dreams of Autonomy
Рет қаралды 145 М.
All Java 23 Features - Inside Java Newscast #70
11:46
Java
Рет қаралды 14 М.
Introduction to JDK Mission Control
9:18
Java
Рет қаралды 10 М.
сюрприз
1:00
Capex0
Рет қаралды 1,6 МЛН
Iphone or nokia
0:15
rishton vines😇
Рет қаралды 1,8 МЛН
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 49 МЛН
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 29 МЛН
Ждёшь обновление IOS 18? #ios #ios18 #айоэс #apple #iphone #айфон
0:57