One minute
Using an authenticated proxy in Java
Configure a Java app to use an authenticated proxy
Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("domain\\user","password".toCharArray());
}
});
Read other posts