Hi Nicolai, Funny, I was just exploring the related code the other day. If you are interested, look for usage of jdk.tools.jlink.internal.BasicImageWriter.MODULES_IMAGE_NAME, this will get you to the code for writing the "modules" file.
--Gunnar 2018-01-08 21:06 GMT+01:00 Nicolai Parlog <n...@codefx.org>: > Hi Alan, > > my mistake was to assume that the JMOD files contain the bytecode that > the JVM is running. A look into a JRE image would have saved me from that. > > so long ... Nicolai > > > > On 07.01.2018 18:51, Alan Bateman wrote: > > On 07/01/2018 12:57, Nicolai Parlog wrote: > >> Hi! > >> > >> Another question about jlink (guess what chapter I'm working on ;) ). > >> I've tried to find out where jlink puts the content of the jmods > >> folder, but hit a wall. > >> > >> I created a full runtime image with jlink and diffed the file trees > >> (including disk usage), but all that got me was that my image doesn't > >> contain bin/jmc, jmods, lib/misssioncontrol, lib/src.zip, and > >> lib/plugin-legacy.jar - all of that is expected, but where are the > >> class files from the jmod archives? > >> > >> Now I wonder, whether these are just ornamental - does lib/modules > >> contain all the bytecode? I'm confused. > >> > > JEP 220 describes the layout of the run-time image and may help. Many > > modules will only contain classes and resources, they will go the jimage > > container (the internal "modules" file) as Rémi said. Many of the JDK > > modules have launchers (the jdk.compiler module has the javac launcher > > for example), native library, configuration files, legal notices, man > > pages, ... The jlink tool puts these in the locations listed in the JEP. > > > > -Alan > > > > -- > > PGP Key: > http://keys.gnupg.net/pks/lookup?op=vindex&search=0xCA3BAD2E9CCCD509 > > Web: > http://codefx.org > a blog about software development > https://www.sitepoint.com/java > high-quality Java/JVM content > http://do-foss.de > Free and Open Source Software for the City of Dortmund > > Twitter: > https://twitter.com/nipafx >