Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse proxy implementation, NTML(Smartcard credentials when authenticating via a proxy (for examples when communicating with update sites behind a company firewall))
Eclipse proxy implementation, NTML [message #891919] Tue, 26 June 2012 14:59 Go to next message
Matthew Young is currently offline Matthew YoungFriend
Messages: 2
Registered: June 2012
Junior Member
Wondering how Eclipse implements proxy authentication....

Sit behind a company firewall that uses our NetId smartcard for authentication when calling the outside world via a proxy. Eclipse needs a host, port, provider equal to Manual, and Auth equals to false in my network setting to get at update sites. How is this implemented? Reason I ask is that I having trouble making NTML credentials with Apache HTTPClient and thought the Eclipse IDE likely has a Java implementation that I can learn from.

mvh / Matthew Young
Re: Eclipse proxy implementation, NTML [message #891925 is a reply to message #891919] Tue, 26 June 2012 15:23 Go to previous message
Matthew Young is currently offline Matthew YoungFriend
Messages: 2
Registered: June 2012
Junior Member
Likely answering my own question. But apparently the HTTPUrlConnection class does the credential stuff automatically as long as the http.proxyHost and http.proxyPort system properties are set. Just tested:
                String url = "<destination>", proxy = "<our proxy>", port = "8080";
		URL server = new URL(url);
		Properties systemProperties = System.getProperties();
		systemProperties.setProperty("http.proxyHost", proxy);
		systemProperties.setProperty("http.proxyPort", port);
		HttpURLConnection connection = (HttpURLConnection) server.openConnection();
		connection.connect();
		BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
		String inputLine;
		while ((inputLine = in.readLine()) != null) 
		  System.out.println(inputLine);
		in.close();


Assuming Eclipse uses HTTPUrlConnection while HTTPClient doesn't.
Previous Topic:Executable Jar won't load from command line
Next Topic:how do I see compiler errors??
Goto Forum:
  


Current Time: Wed Apr 24 15:12:24 GMT 2024

Powered by FUDForum. Page generated in 0.03083 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top