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.