• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unknown host Exception while connect url

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79239
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic