0

I have made a local copy of the jdeps tool from the openjdk sources. (I want to use it to help me learn more about internals of modules.) I can build the tool but I cannot run it. Java always runs the standard one in the jdk/jmods directory. I have the -classpath option set to point to my copy of the class files just like I would for jdk8 (where it works as expected) but to no avail. If I rename my copy of Main.java (to MyMain.java) then the java runtime says it can't find it even though the classpath is pointing to it. My hunch is there some magic due to the package statement which I left unchanged in my local copy of the source. So I guess my question is how to I get the java runtime to look down the classpath before looking in the standard module library?

Mark Roberts
  • 101
  • 4
  • 1
    If you've copied the jdeps sources then you could put them into a different package. Another approach is to override the classes in the JDK using the --patch-module option to patch the jdk.jdeps module. – Alan Bateman Aug 09 '19 at 07:58
  • Thanks - patch-module did the trick. – Mark Roberts Aug 11 '19 at 19:32

0 Answers0