javassist
javassist copied to clipboard
CannotCompileException: no such class: java.lang.System.out with Java 11 and attach API
Hello,
with Java 11 and the attach API java.lang.* classes can not compiled. With Java 14, it works fine. Please see the attached project for a running sample:
java -version
openjdk version "11.0.9" 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9+11)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9+11, mixed mode)
git clone [email protected]:waldi5001/javaassist-java11-system.git
mvn clean install
java -Djdk.attach.allowAttachSelf=true -cp target/classes:target/javassist-3.28.0-GA.jar de.fk.javaassist.Main
Did you forget to attach the project?
No :D
You can build it by yourself if you checkout my project.