2010-01-16

水電材料行

新遠東水電衛生材料


10675 台北市大安區和平東路三段151號1樓(其實店面是比較向基隆路)

Maps

在較大的地圖上查看新遠東水電衛生材料

2009-12-31

Get real network interface IP-address use JAVA

/* getIPx.java get ethernet ip address */

import java.net.*;
import java.util.*;

public class getIPx {

public static void main(String args[]) throws Exception {

String niname ;
InetAddress ia[] = null ;
String ip = null ;
NetworkInterface ni = null ;
Enumeration e = (Enumeration) ni.getNetworkInterfaces();
ni = (NetworkInterface) e.nextElement() ;
niname = (String) ni.getName();
if (niname!="eth0") {
ni = (NetworkInterface) e.nextElement() ;
niname = (String) ni.getName();
}
System.out.println(niname );
Enumeration e2 = (Enumeration) ni.getInetAddresses(); // get All ipaddresses
/*while (e2.hasMoreElements()) { // if more then one address need do loop
ia[0] = (InetAddress) e2.nextElement();
ip = ia[0].getHostAddress();
} */
System.out.println(e2.nextElement());
} //end of main
} // end of class

2009-12-29

Call Java from JavaScript

原來 JavaScript 可以呼叫 local 的 Java class program

Accessing Java from JavaScript link

Call a Java method from Javascript link

Get local IP address?