• Post Reply Bookmark Topic Watch Topic
  • New Topic

unknown host Exception while connect url

 
fairoz khan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I facing unknown host Exception while compile below code, its working in my local machine, if i moved to server(windows server) i unable to run, i setup the proxy even though its not working can any one help to me.



Thanks in advance
Fairoz p
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
#1) Does the code work on the server if it connects directly, without proxy?

#2) Is the proxy server reachable from the Windows server?
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
… and welcome to the Ranch

I think that question is too difficult for “beginning”, so I shall try moving it.
 
Paul Clapham
Sheriff
Posts: 21889
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find it quite surprising that the proxy host isn't in your machine's local network -- and in fact isn't a valid IP address at all. Perhaps that is part of your problem?
 
Gopinath anumalasetty
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe this following link will helps you.

http://examples.javacodegeeks.com/core-java/net/inetaddress/how-to-get-ip-address-in-java-using-inetaddress/

Small question, but it seems to be funny:

Is that system having internet connection?
 
fairoz khan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gopinath anumalasetty wrote:I believe this following link will helps you.

http://examples.javacodegeeks.com/core-java/net/inetaddress/how-to-get-ip-address-in-java-using-inetaddress/

Small question, but it seems to be funny:

Is that system having internet connection?


yes that system has the internet connection. i can able to open any url from IE, but not from java programm any idea?
 
fairoz khan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:#1) Does the code work on the server if it connects directly, without proxy?

#2) Is the proxy server reachable from the Windows server?


1)no
2)no
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if the proxy server is not reachable from the Windows server then you need to investigate why that is.
 
Paul Clapham
Sheriff
Posts: 21889
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And by the way: remove this line of code from your program.



There is no such system property, so posting code which pretends that there is just leads to more people writing useless and misleading lines of code.
 
fairoz khan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have fixed the problem in window server, the proxy network team has blocked the firewall or proxy. so i able compile and run in that machine
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!