Abolfazl Asoudeh
Abolfazl Asoudeh

Reputation: 1

Adding multiple --module-path with JLink

I was following this tutorial to create a runtime image using JLink. When I reached this part

jlink --module-path "%JAVA_HOME%\jmods";out
  --add-modules jlinkModule
  --output customjre

The semicolon seperated commands in Windows terminal (PowerShell). So it says:

Error: --output must be specified
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options
out: The term 'out' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

So I tried using comma, but not working. I tried this: jlink --module-path 'C:\Program Files\Java\jdk-20\jmods\' --module-path out --add-modules jlinkModule --output customjre

And the file created but I think I did it wrong. What should I two to add multiple --module-path. Also I want to include com.fasterxml.Jackson but I don't know how to add this in JLink.

I searched a lot and found some solutions for other external libraries but I couldn't do this with Jackson. I appreciate any answers.

Upvotes: 0

Views: 888

Answers (1)

mortimer101
mortimer101

Reputation: 1

it's ok


jlink --module-path "%JAVA_HOME%/jmods;./out" --add-modules jlinkModule --output customjre

Upvotes: 0

Related Questions