Skip to content
Advertisement

How can I programmatically determine the setting of jdk.http.ntlm.transparentAuth

I have a case where the server I am working on must be able to use NTLM authentication. I believe it is setting:

jdk.http.ntlm.transparentAuth=allHosts

But I want to prove that at run time. That value is set in a special place. From inside where Java is installed in my case the file is here:

C:Program FilesAdoptOpenJDKjdk-11.0.4.11-hotspotconfnet.properties

How can I query that value? I would like to be able to do it from a debugger in an Evaluate, while paused at a break point. Something like the following would be good (but note that this doesn’t work, since it isn’t part of the env)

System.getenv("Path")

Advertisement

Answer

The class that caches these values is java.base/sun.net.NetProperties and the .get(String key) method is public static so it should be accessible to a debugger.

Advertisement