Newbie Jigsaw question: How should I use 'jmod hash'

Alan Bateman Alan.Bateman at oracle.com
Tue Jan 22 12:06:04 UTC 2019


On 21/01/2019 12:57, Andre Tadeu de Carvalho wrote:
> Hi,
>
> I am exploring the jmod utility and I am stuck with the following: I
> already generated the jmod file and I want to add a hash from the dependent
> module in it. I asked the same question in StackOverflow:
> https://stackoverflow.com/questions/54269994/how-should-i-use-jmod-hash
>
> What I am doing:
>
> jmod create --class-path target/mods/A target/jmods/A.jmod
> jmod create --class-path target/mods/B target/jmods/B.jmod
>
> Where B depends on A. Assuming I understood the documentation right, I
> could add B hash into A.jmod. I am trying the following:
>
> jmod hash --hash-module B --module-path target/jmods target/jmods/A.jmod
>
> When I run jmod describe, the hash is still not there. What I am doing
> wrong? Can I use jmod hash the way I am using it?
>
I think you've run a bug with the `hash` option to update an existing 
JMOD file.

Can you change the pattern you specify `--hash-modules .*` and see if 
that works for you? Alternatively, specify the --hash-modules option 
when creating the JMOD.

-Alan.




More information about the jigsaw-dev mailing list