JMOD(1) JDK Commands JMOD(1) (NAME) jmod - JMOD JMOD (SYNOPSIS) jmod (create|extract|list|describe|hash) [options] jmod-file : create JMOD . extract JMOD . list . describe . hash . options JMOD . jmod-file JMOD . (DESCRIPTION) : Maven JAR . jmod (native) jlink . JMOD .class . . jmod JMOD . --exclude . --hash-modules jmod hash . (package) (qualified exports) . . JMOD (OPTIONS FOR JMOD) --class-path path JAR JMOD . --cmds path JMOD . --compress compress JMOD . zip-[0-9] zip-0 zip-9 . zip-6 . --config path JMOD . --dateTIMESTAMP - ISO-8601 "2022-02-12T12:30:00-05:00". --dir path jmod JMOD . --dry-run hash . . --exclude pattern-list ( ) : o glob-pattern o glob:glob-pattern o regex:regex-pattern glob-pattern FileSystem.getPathMatcher . regex-pattern Pattern . --hash-modules regex-pattern regex-pattern . JMOD JMOD JAR jmod hash . --header-files path JMOD . --help -h . --help-extra . --legal-notices path JMOD . --libs path JMOD . --main-class class-name module-info.class . --man-pages path man JMOD . --module-version module-version module-info.class . --module-path path -p path . --hash-modules . --target-platform platform JMOD . - . linux-amd64 windows-amd64 macos-aarch64 . --version jmod . @filename . . . . (#) () . jmod :.IP #Wed Dec 07 00:40:19 EST 2016 create --class-path mods/com.greetings --module-path mlib --cmds commands --config configfiles --header-files src/h --libs lib --main-class com.greetings.Main --man-pages man --module-version 1.0 --target-platform "macos-aarch64" greetingsmod JMOD (EXTRA OPTIONS FOR JMOD) Options for jmod . --do-not-resolve-by-default --warn-if-resolved (resolve) . deprecated deprecated-for-removal incubating. JMOD CREATE (JMOD CREATE EXAMPLES) JMOD : jmod create --class-path build/foo/classes jmods/foo1.jmod JMOD 2022 March 15 00:00:00: jmod create --class-path build/foo/classes --date 2022-03-15T00:00:00Z jmods/foo2.jmod JMOD (header files) man : jmod create --class-path mods/com.greetings --cmds commands --config configfiles --header-files src/h --libs lib --man-pages man --main-class com.greetings.Main --module-version 1.0 --target-platform "macos-aarch64" greetingsmod JMOD HASH (JMOD HASH EXAMPLE) ( ma) (mb) (link) . 1. .java : o jmodhashex/src/ma/module-info.java module ma { requires mb; } o jmodhashex/src/mb/module-info.java module mb { } o jmodhashex2/src/ma/module-info.java module ma { requires mb; } o jmodhashex2/src/mb/module-info.java module mb { } 2. JMOD . jmodhashex/jmods jmodhashex2/jmods jmodhashex jmodhashex2 : o jmod create --class-path mods/ma jmods/ma.jmod o jmod create --class-path mods/mb jmods/mb.jmod 3. jmod hash . jmodhashex : jmod hash --dry-run -module-path jmods --hash-modules .* : Dry run: mb hashes ma SHA-256 07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a jmod hash ( --dry-run) ma mb . 4. JMOD jmodhashex . jmodhashex : jmod hash --module-path jmods --hash-modules .* : Hashes are recorded in module mb 5. JMOD jmodhashex . jmodhashex : jmod describe jmods/ma.jmod ma requires mandated java.base requires mb jmod describe jmods/mb.jmod mb requires mandated java.base hashes ma SHA-256 07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a 6. (runtime image) ma jmodhashex2 mb jmodhashex . jmodhashex2 : o Linux macOS: jlink --module-path $JAVA_HOME/jmods:jmods/ma.jmod:../jmodhashex/jmods/mb.jmod --add-modules ma --output ma-app o Windows: jlink --module-path %JAVA_HOME%/jmods;jmods/ma.jmod;../jmodhashex/jmods/mb.jmod --add-modules ma --output ma-app : Error: Hash of ma (a2d77889b0cb067df02a3abc39b01ac1151966157a68dc4241562c60499150d2) differs to expected hash (07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a) recorded in mb JDK 26.0.2.1 2026 JMOD(1)