How to get the ip of the computer on linux through Java ?
I searched the net for examples, I found something regarding NetworkInterface class, but I can\'t wrap my
The simplest solution in my case was Socket.getLocalAddress(). I had to open the Socket specifically for that purpose, but with all the NetworkInterfaces on my Ubuntu 10.04 machine it was the only way to get the external IP address.
Socket.getLocalAddress()