• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Working with Internet URL from Eclipse  RSS feed

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to execute a java Program which attempts to copy a file from internet URL to my local disk.

I am using the following code for getting connection to the URL.



My system is connected to internet through proxy server. In ECLIPSE I have entered the proxy host, proxy port, proxy authentication details in the Windows --> Preferences --> Internet --> Proxy Settings window.

But when I execute the above Code,it displays an exception java.net.UnknownHostException.

Any ideas on how to connect to Internet URL from a system which is behind the Proxy Server ?
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think configuring the proxy setting in the eclipse would work.
I think it needs to be done in your java code instead.
 
Bartender
Posts: 2653
18
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed.

Look at URL.openConnection(Proxy proxy).

Your Eclipse proxy settings are not used in your java code.

Regards, Jan
 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!