Get rid of a jni resolve warning about java.lang.PanwHooks on java.exe startup

Viewed 1111

Every time I use java.exe, there is this warning:

PowerShell > java -version
[0.052s][warning][jni,resolve] Re-registering of platform native method: java.lang.PanwHooks.NativeMethodEntry(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V from code in a different classloader
java version "18.0.2" 2022-07-19
Java(TM) SE Runtime Environment (build 18.0.2+9-61)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.2+9-61, mixed mode, sharing)

No matter the JDK version. It's the same behavior whether it's jdk1.8.0_211, jdk-11.0.14, jdk-17.0.2 or jdk-18.0.2. Same for OpenJDK 1.8, 11, 17 and 18.

I can not find where is the setting that is used that makes this happen. Any advice will be much appreciated.

The environment is windows 10.

1 Answers

It looks like it's loading a native library on VM startup as well:

[0.009s][info][os       ] attempting shared library load of C:\Program Files\Palo Alto Networks\Traps\cyjagent.dll

which looks like a Java agent.

The 'Panw' in PanwHooks seems to stand for Palo Alto Networks, which seems to be an antivirus software. i.e. this antivirus software seems to be injecting a dll which is a java agent, into the JVM process, which then produces this warning.

You should be able to suppress the warning with -Xlog:jni+resolve=off (but I realize that's not ideal).

Related