Created
July 12, 2011 06:41
-
-
Save mike-neck/1077510 to your computer and use it in GitHub Desktop.
get InetAddress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.*; | |
NetworkInterface.getNetworkInterfaces().each{nInterface -> | |
println 'display name : ' + nInterface.getDisplayName() | |
nInterface.getInetAddresses().each{addr -> | |
address = addr.getHostAddress() | |
println 'address : ' + address | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment