Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

InetAddress

  Asked By: Zobah    Date: Sep 20    Category: Java    Views: 468
  

i am unable to create instance of InetAddress by using the static method
getByAddress(). Pls help me....

try
{
String sysIp = "192.9.200.244";
InetAddress ipAdd = InetAddress.getByAddress(sysIp.getBytes());
}
catch(UnknownHostException e)
{
System.out.println("UnknownHostException::"+e.getMessage());
System.out.println("*********Could not register for traps***********");
return;
}

I am getting the following output.

UnknownHostException::addr is of illegal length
*********Could not register for traps***********

Share: 

 

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

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

Related Topics:



Tagged:  

 

Related Post