java »ñµÃ ip µØÖ·
Ò»°ãÇé¿ö»ñµÃ±¾µØËùÓеÄipµØÖ·£º
try {
InetAddress address = InetAddress.getLocalHost();
System.out.println(address.getHostAddress());
String name = address.getHostName();
System.out.println(name);
InetAddress[] addresses = InetAddress.getAllByName(name);
for(int i=0;i <addresses.length;i++)
System.out.println(addresses[i].getHostAddress());
}
catch(UnknownHostException uhe) {
System.err.println( "Unable to find IP ");
}
}
try {
InetAddress address = InetAddress.getLocalHost();
System.out.println(address.getHostAddress());
String name = address.getHostName();
System.out.println(name);
InetAddress[] addresses = InetAddress.getAllByName(name);
for(int i=0;i <addresses.length;i++)
System.out.println(addresses[i].getHostAddress());
}
catch(UnknownHostException uhe) {
System.err.println( "Unable to find IP ");
}
}
µ«ÊÇÒÔÉÏ·½·¨ÔÚlinuxÏÂÊDz»Ðеģ¬
Ïà¹ØÎĵµ£º
×î½ü¹«Ë¾Åöµ½ÐèÒªÓÃͼ±íµÄÐÎʽÏÔʾһЩÊý¾Ý£¬ÎҾͿªÊ¼µ½ÍøÉϲéѯ£¬²éµ½ÁËjfreechartºÍamcharts,ÕâÁ½ÕßÎÒ¶¼ÊµÏÖ¹ýÁË£¬jfreechart×îºóÉú³ÉͼƬ£¬µ«ÊÇͼƬЧ¹û²»ÊÇÎÒÏëÒªµÄ£¬È»ºóÓÖÑо¿amcharts ËüµÄЧ¹ûȷʵºÜºÃ£¬¶øÇÒ¹Ù·½ÍøÕ¾ÉÏ»¹ÓкÃЩÀý×ӿɹ©ÏÂÔØ£¬ÍøÖ·ÊÇ:www.amcharts.com
£¨ÏëÒªÍê³ÉÒ»¸öamchartsͼÐÎÐèÒªswfobjects. ......
1¡£ÒªÓõ½µÄ°üÓУº
2.json , javaÖ®¼ä»ù±¾ÀàÐ͵Äת»»£¬
StringBuffer sb = new StringBuffer("{'name':'oop'}");
JSONObject jo = JSONObject.fromObject(sb.toString());
Map<String,Object> map = new HashMap<String,Object>();
&nbs ......
java µÄÈ¥µô¿Õ¸ñ¿ÕÐеÄÀý×Ó£º
String so = "haolong, hei eip, "
+"ting, " +
& ......
ÎļþÉÏ´«·½·¨£¨Ò»´ÎÉÏ´«Ò»¸öÎļþ£¬¶à¸öÎļþµÄ»°£¬Çëдѻ·µ÷Óã©
Upload.uploadFile(theFile, filePath)
˵Ã÷£º
theFile£ºÀàÐÍÊÇFormFile
filePath£ºactionÖз¾¶»ñÈ¡·½·¨ this.getServlet().getServletContext().getRealPath("/")
µ÷Óô˷½·¨·µ»ØÎļþÉÏ´«ºóµÄ·¾¶Ãû
ÉÏ´«¶à¸öÎļþʱ£¬ÇëÉèÖÃÿ¸öÎ ......