Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

unknown host Exception while connect url

 
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
 
Rancher
Posts: 43016
76
  • 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?
 
Marshal
Posts: 70260
282
  • 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.
 
Marshal
Posts: 25814
69
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?
 
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: 43016
76
  • 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
Marshal
Posts: 25814
69
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
 
    Bookmark Topic Watch Topic
  • New Topic