Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Java Networking

  Asked By: Inba    Date: Oct 11    Category: Java    Views: 533
  

Dear Friends
I am getting UnknownHostException when i run the following code..but my host name is correct.sometimes it works perfect but sometimes it does not work
Can any one please help me?..



Code:

import java.net.*;

class InetAddressTest
{
public static void main(String args[]) throws
UnknownHostException {
InetAddress SW[] = InetAddress.getAllByName("MAS.EGINNOVATIONS.COM");
for (int i=0; i<SW.length; i++){
System.out.println(SW[i]);
}
}
}

With regards
Inbaraj

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Java Networking Or get search suggestion and latest updates.




Tagged: