Disable the java verifier within java
Disable java runtime verifier per-class on the fly only using java.
This library uses Unsafe
to unset the _misc_flags_should_verify
flag in the Class
object found in OpenJDK based JVMs.
Therefore, this library will only work on OpenJDK based JVMs.
A writeup on what it is based on can be found here which explains the process in more detail.
Simply call DeVerifier.disableVerifier(clazz)
to disable the verifier for this class.
Unsafe
to be accessible.Class
object is laid out in memory the same way as in OpenJDK.