Unable to compile modules with references to automatic modules - "cannot find module: jdk.management.resource"

Florian Troßbach florian.trossbach at codecentric.de
Sat Nov 7 10:15:01 UTC 2015


Hi,

Following the sessions at JavaOne i started playing around with Jigsaw. I
am using Build 86 64-bit on OSX.

I have trouble compiling a multicompilation project that uses commons-lang3
as an automatic module on the modulepath.
The code is available at https://github.com/ftrossbach/IntroToJigsaw, this
specifically is the example 6 folder (1-5 work fine, 5 should be the same
as 6 but without the reference to the automatic module).

When I compile my modules with

javac -d . -mp ../jars -modulesourcepath . -verbose   $(find . -name
"*.java")

I get the attached output. The raised error is "error: cannot find module:
jdk.management.resource”.

I do not understand what that means or why this module is read. When I
compile the module without the reference to commons-lang3, it does not
occur. When I look at the commonslang3 jar  with jdeps, i only get a
dependency on java.base:

$ jdeps -s ../jars/commonslang3.jar
commonslang3.jar -> java.base

Any help with this problem is greatly appreciated.

Best regards,
Florian

-- 
Florian Troßbach | IT-Consultant | Agile Software Factory  | Consulting
codecentric AG | Zeppelinstr 2 | 76185 Karlsruhe | Deutschland
tel: +49 (0) 721.9595-681 | fax: +49 (0) 721.9595-666 | mobil: +49 (0)
173.6700743
www.codecentric.de | blog.codecentric.de | www.meettheexperts.de |
www.more4fi.de

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche
und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie
bitte sofort den Absender und löschen Sie diese E-Mail und evtl.
beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen
evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet



-- 
Florian Troßbach | IT-Consultant | Agile Software Factory  | Consulting
codecentric AG | Zeppelinstr 2 | 76185 Karlsruhe | Deutschland
tel: +49 (0) 721.9595-681 | fax: +49 (0) 721.9595-666 | mobil: +49 (0)
173.6700743
www.codecentric.de | blog.codecentric.de | www.meettheexperts.de |
www.more4fi.de

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche
und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie
bitte sofort den Absender und löschen Sie diese E-Mail und evtl.
beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen
evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet
-------------- next part --------------
[parsing started RegularFileObject[./de.codecentric.addresschecker/de/codecentric/addresschecker/api/AddressChecker.java]]
[parsing completed 18ms]
[parsing started RegularFileObject[./de.codecentric.addresschecker/de/codecentric/addresschecker/api/Run.java]]
[parsing completed 3ms]
[parsing started RegularFileObject[./de.codecentric.addresschecker/de/codecentric/addresschecker/internal/AddressCheckerImpl.java]]
[parsing completed 1ms]
[parsing started RegularFileObject[./de.codecentric.addresschecker/module-info.java]]
[parsing completed 0ms]
[parsing started RegularFileObject[./de.codecentric.zipvalidator/de/codecentric/zipvalidator/api/ZipCodeValidator.java]]
[parsing completed 1ms]
[parsing started RegularFileObject[./de.codecentric.zipvalidator/de/codecentric/zipvalidator/api/ZipCodeValidatorFactory.java]]
[parsing completed 0ms]
[parsing started RegularFileObject[./de.codecentric.zipvalidator/de/codecentric/zipvalidator/internal/ZipCodeValidatorImpl.java]]
[parsing completed 1ms]
[parsing started RegularFileObject[./de.codecentric.zipvalidator/module-info.java]]
[parsing completed 1ms]
[parsing started RegularFileObject[./de.codecentric.zipvalidator.model/de/codecentric/zipvalidator/model/api/ZipCodeValidationResult.java]]
[parsing completed 0ms]
[parsing started RegularFileObject[./de.codecentric.zipvalidator.model/module-info.java]]
[parsing completed 3ms]
[loading /modules/java.base/module-info.class]
error: cannot find module: jdk.management.resource
[loading /modules/jdk.zipfs/module-info.class]
[loading /modules/jdk.xml.ws/module-info.class]
[loading /modules/java.xml.ws/module-info.class]
[loading /modules/java.logging/module-info.class]
[loading /modules/java.xml.bind/module-info.class]
[loading /modules/java.compiler/module-info.class]
[loading /modules/java.desktop/module-info.class]
[loading /modules/java.prefs/module-info.class]
[loading /modules/java.xml/module-info.class]
[loading /modules/java.datatransfer/module-info.class]
[loading /modules/java.activation/module-info.class]
[loading /modules/java.management/module-info.class]
[loading /modules/java.rmi/module-info.class]
[loading /modules/java.naming/module-info.class]
[loading /modules/java.security.sasl/module-info.class]
[loading /modules/jdk.httpserver/module-info.class]
[loading /modules/java.annotations.common/module-info.class]
[loading /modules/jdk.xml.bind/module-info.class]
[loading /modules/jdk.compiler/module-info.class]
[loading /modules/jdk.xml.dom/module-info.class]
[loading /modules/jdk.snmp/module-info.class]
[loading /modules/jdk.security.jgss/module-info.class]
[loading /modules/java.security.jgss/module-info.class]
[loading /modules/jdk.security.auth/module-info.class]
[loading /modules/jdk.sctp/module-info.class]
[loading /modules/jdk.scripting.nashorn.shell/module-info.class]
[loading /modules/jdk.scripting.nashorn/module-info.class]
[loading /modules/java.scripting/module-info.class]
[loading /modules/jdk.internal.le/module-info.class]
[loading /modules/jdk.rmic/module-info.class]
[loading /modules/jdk.javadoc/module-info.class]
[loading /modules/java.corba/module-info.class]
[loading /modules/java.transaction/module-info.class]
[loading /modules/jdk.policytool/module-info.class]
[loading /modules/java.sql/module-info.class]
[loading /modules/jdk.plugin.dom/module-info.class]
[loading /modules/jdk.deploy/module-info.class]
[loading /modules/jdk.plugin/module-info.class]
[loading /modules/jdk.javaws/module-info.class]
[loading /modules/jdk.pack200/module-info.class]
[loading /modules/jdk.naming.rmi/module-info.class]
[loading /modules/jdk.naming.dns/module-info.class]
[loading /modules/jdk.management/module-info.class]
[loading /modules/jdk.localedata/module-info.class]
[loading /modules/jdk.jvmstat/module-info.class]
[loading /modules/jdk.jlink/module-info.class]
[loading /modules/jdk.jdeps/module-info.class]
[loading /modules/jdk.internal.opt/module-info.class]
[loading /modules/jdk.jfr/module-info.class]
[loading /modules/java.instrument/module-info.class]
[loading /modules/jdk.jdwp.agent/module-info.class]
[loading /modules/jdk.jdi/module-info.class]
[loading /modules/jdk.attach/module-info.class]
[loading /modules/jdk.jconsole/module-info.class]
[loading /modules/jdk.jcmd/module-info.class]
[loading /modules/jdk.hotspot.agent/module-info.class]
[loading /modules/jdk.jartool/module-info.class]
[loading /modules/jdk.deploy.osx/module-info.class]
[loading /modules/jdk.crypto.pkcs11/module-info.class]
[loading /modules/jdk.crypto.ec/module-info.class]
[loading /modules/jdk.charsets/module-info.class]
[loading /modules/jdk.accessibility/module-info.class]
[loading /modules/javafx.web/module-info.class]
[loading /modules/javafx.graphics/module-info.class]
[loading /modules/javafx.base/module-info.class]
[loading /modules/javafx.controls/module-info.class]
[loading /modules/javafx.media/module-info.class]
[loading /modules/javafx.swing/module-info.class]
[loading /modules/javafx.fxml/module-info.class]
[loading /modules/javafx.deploy/module-info.class]
[loading /modules/java.xml.crypto/module-info.class]
[loading /modules/java.sql.rowset/module-info.class]
[loading /modules/java.smartcardio/module-info.class]
[loading /modules/java.se/module-info.class]
[loading /modules/java.compact3/module-info.class]
[loading /modules/java.compact2/module-info.class]
[loading /modules/java.compact1/module-info.class]
[total 218ms]
1 error


More information about the jigsaw-dev mailing list