javax.naming.AuthenticationException
问题 I'm trying to create a context for ActiveDirectory (client and server are both windows), using my Windows credentials with NTLM. This is my code: public void func() { try { URL configURL = getClass().getResource("jaas_ntlm_configuration.txt"); System.setProperty("java.security.auth.login.config", configURL.toString()); // If the application is run on NT rather than Unix, use this name String loginAppName = "MyConfig"; // Create login context LoginContext lc = new LoginContext(loginAppName,