How to get the ip Address of the System

I am working on a Service where i need to provide my ipAddress in the returnURL.
Can some one let me know which method to use in Jython to fetch the IP Address of my system such that when i run the test it automatically fetches the IP.

Please be aware that a system may have multiple NICs and each NIC may have multiple IP addresses assigned to it. Depending on your requirements, you may need to check all of those and pick the IP address you think you want to use. The script from the previous post is for python (Jython). In contrast, there are java APIs for collecting IP addresses which you could call from a Groovy script. In particular, there is java.net.NetworkInterface.getNetworkInterfaces() which returns the list of network interfaces. For each network interface, you can call java.net.NetworkInterface.getInetAddresses() to get the list of IP address for that network interface.

There's either an error in your script or possibly your Jython home is not pointing to a Jython 2.5.2 installation, having an incompatible socket.py. See docs for details about configuring Jython home. You can't configure Jython home to some other python installation or a different version of Jython (must be Jython 2.5.2).

However, if you require a timely resolution then I'd recommend you consider contacting Parasoft support to help look at this with you.