Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final String authUser = "asaf";
- final String authPassword = "1234";
- Authenticator.setDefault(
- new Authenticator() {
- @Override
- public PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(
- authUser, authPassword.toCharArray());
- }
- }
- );
- System.setProperty("https.proxyUser", authUser);
- System.setProperty("https.proxyPassword", authPassword);
- System.setProperty("http.proxyUser", authUser);
- System.setProperty("http.proxyPassword", authPassword);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement