System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", "172.1.1.2");
System.getProperties().put("proxyPort", "8080");
Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(
"Usuario"),"Senha").toCharArray());
}
});
URL u = new URL(url);
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário