Questions tagged [remote-host]
46 questions
-2
votes
1 answer
How can I get the users IP and hostname using Java
InetAddress addr = java.net.InetAddress.getRemoteHost();
MyHost = addr.getHostName();
IPaddressString = addr.getHostAddress();
The above code returns the users local data being 127.0.0.1 and Localhost

AjayD3V
- 9
- 3