Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
139 views
in Technique[技术] by (71.8m points)

java 15 jdeps --print-module-deps does not print comma separated list (windows 10, cmd)

I have a command to print jdeps output

"C:Usersestjdk-15.0.2+7_zip_unzipinjdeps.exe" --print-module-deps --multi-release="11" -cp C:Usersest.m2
epositoryorghibernatehibernate-core5.4.23.Finalhibernate-core-5.4.23.Final.jar -recursive "mytest.jar"

in comma format, i.e jar1.jar,jar2.jar,...

but all I get is

 org.springframework.cglib.transform.AbstractProcessTask -> org.apache.tools.ant.BuildException                not found
   org.springframework.cglib.transform.AbstractProcessTask -> org.apache.tools.ant.DirectoryScanner              not found
   org.springframework.cglib.transform.AbstractProcessTask -> org.apache.tools.ant.Project                       not found
   org.springframework.cglib.transform.AbstractProcessTask -> org.apache.tools.ant.Task                          not found
   org.springframework.cglib.transform.AbstractProcessTask -> org.apache.tools.ant.types.FileSet                 not found
   org.springframework.core.CoroutinesUtils           -> kotlin.Metadata                                    not found
   org.springframework.core.CoroutinesUtils           -> kotlin.coroutines.Continuation                     not found
   org.springframework.core.CoroutinesUtils           -> kotlin.coroutines.CoroutineContext                 not found

What I'm doing wrong?

Update no.1

--print-module-deps
Same as --list-reduced-deps with printing a comma-separated list of module dependences. The output can be used by jlink --add-modules to create a custom image that contains those modules and their transitive dependences.

so, I expect the output to be something like this

java.base,java.compiler,java.naming,java.security.jgss,java.security.sasl,java.sql,jdk.management,jdk.unsupported
question from:https://stackoverflow.com/questions/65871039/java-15-jdeps-print-module-deps-does-not-print-comma-separated-list-windows-1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

So, I think I understand why I've got this output.

For some reason --print-module-deps option also prints out lines on modules which it failed to find and that is why I did not see comma separated output, if you tried to use that very same command with an addition option of --?ignore-missing-deps, you would see a comma separated list.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...