background: java has a mechanism for instrumenting native methods by basically allowing you to rename the native method with a set prefix and then create a method that delegates to it, in bytecode.
It appears by default this is disallowed. Calling Instrumentation.setNativePrefix()
performs a check on InstrumentationImpl.mEnvironmentSupportsNativeMethodPrefix
, which I see in the jvm C code defaults to "false".
I see there is possibly a way to enable it with a native agent via JVMTI, but I can't find anything about enabling it with a java-language agent.