Skip to content

jre and jre-with-tools #93

Answered by brunoborges
dkirrane asked this question in Q&A
Jul 7, 2021 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

@dkirrane if you are in a Linux environment (or macOS), you can do something like this:

jlink --add-modules $(java --list-modules) \
         --strip-debug \
         --no-man-pages \
         --no-header-files \
         --compress=2 \
         --output /javaruntime

This will create a Java runtime that has all the modules available in the JDK you are building the runtime from. With some bash magic, you may be able to do an exclusionary set up (as in, add all modules except module A, B, and C).

For packages such as jre-headless-with-tools, the benefit in storage size is not significant to justify building and maintaining them compared to just using the JDK. For other jre* packages, the us…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@dkirrane
Comment options

@karianna
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by brunoborges
Comment options

You must be logged in to vote
1 reply
@brunoborges
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
4 participants