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
4
votes
2 answers

Unexpected behaviour from Gson

I developed a small application that stores data coming from a device: I chose to store data in JSON format, and the serialization/deserialization of the data works just fine, even if it involves some custom types created by me...but only I work in…
il_boga
  • 1,305
  • 1
  • 13
  • 21
4
votes
2 answers

jdeps command use with `--multi-release` option failed

I ran the followings commands, but I got the same errors: $ jdeps --generate-module-info . --multi-release 9 libs/log4j-core-2.11.1.jar Error: log4j-core-2.11.1.jar is a multi-release jar file but --multi-release option is not set $ jdeps…
Fabrício Pereira
  • 1,521
  • 1
  • 12
  • 20
4
votes
1 answer

No output with jdeps when using -jdkinternals

I am trying to use the Java Dependency Analysis Tool (jdeps). First I tried to do it with no arguments like so: jdeps myJar.jar It lists the dependencies that it uses. So far so good. org.example (myJar.jar) -> java.io -> java.lang ->…
Thunderforge
  • 19,637
  • 18
  • 83
  • 130
3
votes
1 answer

How to tell which module does the package belong to?

Given some package foo.bar, how do I find which module does it belong to? For example, package java.util belongs to module java.base. I can verify it by typing in jdeps -m java.base and by going through the long output. This however assumes my prior…
Avaldor
  • 317
  • 2
  • 8
3
votes
1 answer

jdeps command failing when trying to resolve OpenJFX jmods

I am trying to run a jdeps command on a project that uses OpenJFX, but it keeps failing. The command I am using, simplified as much as I can: jdeps --module-path Y:\javafx-jmods-11.0.2 --add-modules javafx.base Test.jar javafx-jmods-11.0.2 is a…
Chatoyancy
  • 143
  • 1
  • 17
3
votes
1 answer

jdeps fails with Java 11 and JavaFX in fat jar

I am trying to use jdeps (and jlink) for deployment of my Java 11 app which is using JavaFX 11. All works fine running inside my Java IDE. But when I use jdep I get the following error, which indicates that some module or package cannot be found. I…
cfsoe
  • 53
  • 4
3
votes
1 answer

Error: unknown option: -M while using module option of maven-jdeps-plugin

I found the module attribute on the official documentation of the maven-jdeps-plugin which states that Show module containing the package Type: boolean Since: JDK 1.9.0 Required: No User Property: jdeps.module Default: false Trying to make…
Naman
  • 27,789
  • 26
  • 218
  • 353
3
votes
2 answers

Cannot find jdeps command (Mac)

I'm using Java 8 update 45 on my mac. I've tried to use 'jdeps' command, but my mac keeps showing "command not found" message. Weird thing is that other command in the bin folder like 'java', 'javac' perfectly works. Only 'jdeps' command is not…
byron1st
  • 969
  • 1
  • 13
  • 35
2
votes
0 answers

JavaFX module program with MySQL doesn't work with custom JRE

I wrote small program with JavaFX, and MySQL worked through JDBC. It works well, was compiled well to jar and works from jar also well. To deliver this application to users I packed this to exe with launch4j and build custom small JRE. Exe file was…
2
votes
0 answers

Can JDeps show dependency of one class on another class within the same module/package?

I am trying to get a UML-style graph of my module. I tried the verbose class option but it still does not show the relationship between one class and another class within the same module. jdeps -verbose:class…
Ashwin
  • 53
  • 5
2
votes
1 answer

javax.net.ssl.SSLHandshakeException happening when using custom java runtime image but not without

I have this class which just sends a http post request: import java.net.*; import java.io.*; public class JarRuntimeTest{ public void start() throws Exception{ HttpURLConnection connection = (HttpURLConnection) (new…
2
votes
0 answers

Changed jdeps behavior in OpenJDK 11.0.11 (JDK-8214213)

Summary Our build pipeline has been broken after some machines have updated from JDK 11.0.10- to JDK 11.0.11+. This happens due to changed jdeps behavior. After some research it became evident, this is likely due to changes introduced with…
Koenigsberg
  • 1,726
  • 1
  • 10
  • 22
2
votes
0 answers

Why does jdeps issue a warning about a split package?

I have a simple non-modular jar file main.jar that depends on libA.jar and libB.jar. These three jar files all reside in the current directory. I want jdeps (version 15.0.1) to generate a module-info.java file for main.jar. Here's my shell command…
Angle.Bracket
  • 1,438
  • 13
  • 29
2
votes
1 answer

How to get Java class' real module dependency?

My JDK version is OpenJDK 11. My class File is jmx.Main.class Here are my code. package jmx; import java.lang.management.ManagementFactory; import javax.management.AttributeNotFoundException; import…
S.Lee
  • 206
  • 1
  • 4
  • 15
2
votes
1 answer

How to use jdeps to analysis dependency of a fat jar(spring-boot)?

The fat jar works well and I just want to use a cropped JRE. I tried with following: jdeps --list-deps {my fat jar} The result I got is: java.base java.logging If I use that to make my own JRE using jlink --no-header-files --no-man-pages…
GoForce5500
  • 111
  • 1
  • 7