Questions tagged [jdeps]

The Java Dependency Analysis Tool introduced in JDK 8, which provides information on what dependencies are used in a jar.

The Java Dependency Analysis Tool introduced in JDK 8, which provides information on what dependencies are used in a jar. Using the -jdkinternals flag, it is also used for detecting JDK internal APIs (e.g. sun.*) that are unsupported.

External Links:

64 questions
1
vote
1 answer

Using jdeps with REGEX

I'm able to get the list of dependencies using jdeps: jdeps myjar.jar works fine. Tried excluding a particular package in the output: jdeps -f 'java.io' myjar.jar - this excludes the package java.io from the output Finally, i would like to exclude…
che_new
  • 45
  • 1
  • 6
1
vote
1 answer

jdeps command does not work with -p attribute

When I execute this command: jdeps --module-path out --module test it's fine and it prints all the information. But when I replace --module-path with -p, it throws an exception: jdeps -p out --module test Exception in thread "main"…
Ng Sharma
  • 2,072
  • 8
  • 27
  • 49
1
vote
1 answer

Unable generating module-info for legacy jar via jdeps using Java 11

I need to generate module-info file for legacy jar which named as: selenium-chrome-driver-3.141.59.jar using the command: jdeps --module-path modules --generate-module-info out selenium-chrome-driver-3.141.59.jar But I'm getting as result: Missing…
invzbl3
  • 5,872
  • 9
  • 36
  • 76
1
vote
1 answer

jdeps failing on sprinboot project

i have springboot web application, i am trying to run jdeps (using java11) on this project, it is failing with error. jdeps command: jdeps --print-module-deps --multi-release 9 -cp ./*.jar . exception: Exception in thread "main"…
karts
  • 151
  • 3
  • 12
1
vote
1 answer

Get class-level dependencies from inside Maven (jdeps)

Applying jdeps -v to a jar lists all the class level dependencies of that jar, i.e. which of your classes uses which other class. I would like to extract the same information during the build. Therefore, I would like to write or configure a Maven…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
1
vote
0 answers

Java 9 - how to recompile .jar library with module-info

I read that to add .jar libraries as dependency in java9 modules, we just need to include them in --module-path and they will be converted to 'Atomatic Modules' However when I try to use jLink, I still got the error: Error: module-info.class not…
Tiago Santos
  • 489
  • 5
  • 16
1
vote
3 answers

jdeps equivalent for Java 7

I need to analyse which classes are used (referenced) by the different .class files in a jar. I know that jdeps -v example.jar produces this output. Unfortunately, I need a solution that works if the user has only a JDK 1.7. How could this be…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
0
votes
0 answers

JDeps says module not found when working with module project

I'm struggling with jdeps. Java 17. I have a modular app, with a single module and single module-info.java. It works fine. I'm trying to run jdeps in order to find the required JDK modules so I can use it with jlink. When I run this command: jdeps…
Will Hartung
  • 115,893
  • 19
  • 128
  • 203
0
votes
0 answers

Get a fuctionnal jar with jlink

I am working on a JAVA project with ECLIPSE. I would like to use XSLT3. For that, I need to import a package called SAXON.HE.jar My Java Version is 14. When I use jdeps to get the SAXON.HE.jar dependencies, I get : net.sf.saxon.trans ->…
pouce
  • 21
  • 5
0
votes
1 answer

jdeps does not add jdk.random when using RandomGenerator.getDefault()

I have a Java 17 application which uses RandomGenerator.getDefault() in it. When I use jdeps to create a minified JRE for it, it does not add jdk.random, so the JRE created by jlink cannot run the application. Is there something I missed?
Amir Pashazadeh
  • 7,170
  • 3
  • 39
  • 69
0
votes
0 answers

Why jdeps fails while checking some libraries?

I want to use jdeps for all jars my application use. I use BouncyCastle but the only jar I can check is bcprov-ext-jdk18on-172.jar. jdeps raises java.lang.module.FindException for other BC jars. I added all BC jars to the class path. Jars I want to…
Michał Niklas
  • 53,067
  • 18
  • 70
  • 114
0
votes
1 answer

Will creating non modular application require me to separate my modular from non-modular dependencies

I am upgrading a legacy application to java 11. Currently we don't use maven or gradle. As i've updated it, i've replaced certain libraries that have been removed from the jdk in 11. Some of the newer dependencies i've added contain module-info.java…
janst
  • 102
  • 10
0
votes
1 answer

jlink fails on ring-json 0.5.1

I have a small Clojure project with /project.clj: (defproject testjackson "0.1.0-SNAPSHOT" :main testjackson.core :dependencies [[org.clojure/clojure "1.10.3"] [ring/ring-json "0.5.0"]]) and /src/testjackson/core.clj: (ns…
erdos
  • 3,135
  • 2
  • 16
  • 27
0
votes
0 answers

Java JRE what Modules are needed for Webdrivermanager?

I have created an exe with launch4j that does with the help of Selenium and Webdrivermanager some webautomation. For this I created a small Java Runtime Engine. To create it I used jdeps to get all required dependencies: jdeps -s file.jar. But as…
Muddyblack k
  • 314
  • 3
  • 16
0
votes
2 answers

Modules not found when trying to inject module-info.java

I have a JavaFX project that uses Apache's PDFBox. I want to use JLink to build a JRE of it, but I can't since PDFBox is an automodule. Thus, I'm trying to inject a module-info file in it. I generated this module-info file using jdeps: module…
Allan Juan
  • 2,048
  • 1
  • 18
  • 42