Reputation: 2201
Is it possible to get main server system's(which is connected to LAN) ip address from client system using java?
If yes, how can i do using code?
Upvotes: 0
Views: 256
Reputation: 115388
Generally it is impossible whether using java or any other programming language. This is the reason that LANs exist. The internal IP address is not sent outside the local network and therefore cannot be detected.
However if client and server are developed especially to complete this task to can send the IP on application level. For example to send the IP as a HTTP header if connection is done over HTTP.
Upvotes: 1