temp

// Authenticator authenticator = new Authenticator() {
//
// public PasswordAuthentication getPasswordAuthentication() {
// return (new PasswordAuthentication("a", "123".toCharArray()));
// }
// };
// Authenticator.setDefault(authenticator);

原文地址:https://www.cnblogs.com/goldengallo/p/6233939.html