Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Kerri Gonzalez   on Jul 22 In Java Category.

  
Question Answered By: Ann Evans   on Jul 22

Also,
instead of just:

catch(UnknownHostException nohost){}


make a print out, to see if you are not getting into the catch
for example:

try{
YourAd = InetAddress.getLocalHost();
System.out.println(" -- YourAd has been set to: " +
toString().YourAd );
// or just + YourAd, I don't know InetAddress Class.
}

catch(UnknownHostException nohost){
System.out.println(" -- Error: YourAd has not been set! --
" );
}


return YourAd;
}
}

I would suspect that if it works on someone else's system, then
the object of ComputerName class  is being created, fine, but for some
reason the YourAd is not set. I think...
Good luck. Will be interested to know how you made out.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on trying to return the computername using applet Or get search suggestion and latest updates.


Tagged: