Question

I get "Password Required" eclipse dialog when i try to connect to some remote server with wrong user name and password.

The strange thing is that the Eclipse platform first gets my response and show the dialog and only then it reaches my try/catch block.

I just want to disable this dialog manually or programmatically.

Was it helpful?

Solution 3

Use this code before you send a request:

// use default authenticator in order to catch
// all connectivity exceptions and provide appropriate
// error message
// prevents eclipse from displaying "Password Required" dialog
Authenticator.setDefault(new Authenticator() 
{
});

OTHER TIPS

Window --> Preferences -- > General --> Network Connections --> Set Active Provider to Direct

  1. Go to Window Menu -> Preferences
  2. select General->Network Connections
  3. This page will have Active Provider as Manual/Native in drop down .
  4. Change it to "Direct"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top