-
Bug
-
Resolution: Fixed
-
P3
-
24, 25
-
b03
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8346259 | 24 | Severin Gehwolf | P3 | Resolved | Fixed | b29 |
$ jar -d -f hello.jar
com.other jar:file:////path/to/hello.jar!/module-info.class
exports com.other
requires java.base mandated
requires java.desktop
$ bin/jlink --add-modules com.other --module-path $(pwd):$(pwd)/jmods --limit-modules com.other --verbose --output testme-imagebin/jlink --add-modules com.other --module-path $(pwd) --limit-modules com.other --verbose
Error: Module java.desktop not found, required by com.other
java.lang.module.FindException: Module java.desktop not found, required by com.other
at java.base/java.lang.module.Resolver.findFail(Resolver.java:892)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:192)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:141)
at java.base/java.lang.module.Configuration.resolve(Configuration.java:413)
at java.base/java.lang.module.Configuration.resolve(Configuration.java:252)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.limitFinder(JlinkTask.java:786)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.newModuleFinder(JlinkTask.java:552)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.initJlinkConfig(JlinkTask.java:396)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:289)
at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:50)
at jdk.jlink/jdk.tools.jlink.internal.Main.main(Main.java:34)
For a regular JDK build this works since the `jmods` directory can get added to the module path. For JEP 493 enabled JDKs this directory is not there. However, the dependencies should still be possible to be resolved from the run-time image.
Without --limit-modules this works fine:
$ bin/jlink --add-modules com.other --module-path $(pwd):$(pwd)/jmods --verbose --output testme-imagebin/jlink --add-modules com.other --module-path $(pwd) --limit-modules com.other --verbose
Linking based on the current run-time image
com.other file:///path/to/hello.jar
java.base jrt:/java.base (run-time image)
java.datatransfer jrt:/java.datatransfer (run-time image)
java.desktop jrt:/java.desktop (run-time image)
java.prefs jrt:/java.prefs (run-time image)
java.xml jrt:/java.xml (run-time image)
Providers:
java.desktop provides java.net.ContentHandlerFactory used by java.base
java.base provides java.nio.file.spi.FileSystemProvider used by java.base
java.desktop provides javax.print.PrintServiceLookup used by java.desktop
java.desktop provides javax.print.StreamPrintServiceFactory used by java.desktop
java.desktop provides javax.sound.midi.spi.MidiDeviceProvider used by java.desktop
java.desktop provides javax.sound.midi.spi.MidiFileReader used by java.desktop
java.desktop provides javax.sound.midi.spi.MidiFileWriter used by java.desktop
java.desktop provides javax.sound.midi.spi.SoundbankReader used by java.desktop
java.desktop provides javax.sound.sampled.spi.AudioFileReader used by java.desktop
java.desktop provides javax.sound.sampled.spi.AudioFileWriter used by java.desktop
java.desktop provides javax.sound.sampled.spi.FormatConversionProvider used by java.desktop
java.desktop provides javax.sound.sampled.spi.MixerProvider used by java.desktop
java.desktop provides sun.datatransfer.DesktopDatatransferService used by java.datatransfer
- backported by
-
JDK-8346259 Module dependencies not resolved from run-time image when --limit-module is being used
- Resolved
- blocks
-
JDK-8345259 Disallow ALL-MODULE-PATH without explicit --module-path
- Resolved
- relates to
-
JDK-8345185 Update jpackage to not include service bindings by default
- Resolved
-
JDK-8311302 Implement JEP 493: Linking Run-Time Images without JMODs
- Resolved
- links to
-
Commit(jdk24) openjdk/jdk/6e8aad1a
-
Commit(master) openjdk/jdk/11cd6398
-
Review(jdk24) openjdk/jdk/22738
-
Review(master) openjdk/jdk/22609