You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java runtime plugin generates java runtime using jdeps/jlink tools.
Prerequisites:
JDK is installed in the build image
ca-certificates-java installed in the build image
Application Jar files are located in $CRAFT_STAGE/jars/
Operations:
unpack jar files to a temporary location
Build classpath using jars found in temporary location (spring packages dependencies under BOOT-INF/
run jdeps against jars in $CRAFT_STAGE/jars/ using classpath from the step above
run jlink and deploy image into /usr/lib/jvm/java--openjdk-
link java under /usr/bin/java
java cacerts copied into staging area and symlinked to openjdk
Why it needs to get done
Jlink allows to link lean Java runtime images that only contain components of Java runtime required by the application.
Java provided by Ubuntu archive contains all the modules in lib/modules file (200mb). This can go down to as small as 27mb for java.base.
This both reduces attack surface of the Java application and reduces the deployment size.
The text was updated successfully, but these errors were encountered:
What needs to get done
Java runtime plugin generates java runtime using jdeps/jlink tools.
Prerequisites:
Operations:
Why it needs to get done
Jlink allows to link lean Java runtime images that only contain components of Java runtime required by the application.
Java provided by Ubuntu archive contains all the modules in lib/modules file (200mb). This can go down to as small as 27mb for java.base.
This both reduces attack surface of the Java application and reduces the deployment size.
The text was updated successfully, but these errors were encountered: