LJC/vJUG Hackday query: on the linking process using JLink
sadhak001 at gmail.com
Fri May 12 11:51:06 UTC 2017
*I noticed that the executable directory that is generated in session 01 is
only 44 Mb. Is the link process limiting the JDK modules that it includes
somehow? If so, how? There doesn’t seem to be any info about what JDK
modules to include in the module-info.java files in the project.*
Mani: If you check the modules created in the executable directory it does
only include the java.base module from the jdk modules, and has two of our
modules from the exercise. I would think the linker knows the dependencies
and limits it. There is an inspect.sh script which shows how to inspect the
contents of the modules file to see what modules are included.
- does this answer the question Stefan?
Does the OpenJDK / Java 9 team wish to expound on this ?
*Alan Bateman:* I can’t quite tell what the question is asking. If you
`--add-modules myapp` then jlink will link in “myapp” and all modules that
it transitively requires. Maybe the question is about creating a small
run-time image for a non-modular application? If so then `jdeps` can be
used to do a static analysis and get the list of modules that are required
(no guarantee that it’s all of them of course as there may be core
reflection usages that can’t be detected by jdeps). Send any follow-ups to
jigsaw-dev and we will try to help.
@theNeomatrix369 <http://twitter.com/theNeomatrix369>* | **Blog
<http://neomatrix369.wordpress.com/>** | *LJC Associate & LJC Advocate
(@adoptopenjdk & @adoptajsr programs)
*Meet-a-Project - *MutabilityDetector
<https://github.com/MutabilityDetector>* | **Bitbucket
<https://bitbucket.org/neomatrix369>* * | **Github
<https://github.com/neomatrix369>* * | **LinkedIn
*Come to Devoxx UK 2017:* http://www.devoxx.co.uk/
*Don't chase success, rather aim for "Excellence", and success will come
chasing after you!*
More information about the adoption-discuss