Mercurial > hg > Members > you > BroadCastTreeVNC
annotate src/test/getLocalAddress.java @ 6:01cdbc95142f default tip
update build.xml
author | Yu Taninari <you@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 30 Apr 2012 16:04:44 +0900 |
parents | 756bfaf731f3 |
children |
rev | line source |
---|---|
0 | 1 package test; |
2 | |
3 import java.net.InetAddress; | |
4 import java.net.UnknownHostException; | |
5 | |
6 public class getLocalAddress { | |
7 public static void main(String[] argv) { | |
8 try { | |
9 InetAddress addr = InetAddress.getLocalHost(); | |
10 System.out.println(addr); | |
11 } catch (UnknownHostException e) { | |
12 e.printStackTrace(); | |
13 } | |
14 | |
15 } | |
16 } |