Patching java.base results in java.lang.LinkageError
I am trying to do the same thing in Java 11 that could be done with -Xbootclasspath/p:path in pre java 9. As a simple example I modified one of the valueOf methods of java.lang.Integer and compiled the project with: javac --module-source-path=src/java.base --patch-module java.base=src/java.base -d mods $(find src -name '*.java') I then ran a simple sample using: java --patch-module java.base=<pathToMyModifiedJavaBaseClasses> -p lib -m my.moduleA/my.moduleA.Main That worked an I'm seeing the modifications displayed (a simple print out I did from valueOf ). When I try, however, to do the same