×Ô¼ºÊ¹ÓÃjava×öµÄС¹¤¾ß
µ±ÄãÔÚÄã×Ô¼ºµÄµçÄÔÉÏ×°µÄ¶«Î÷±È½Ï¶àµÄʱºò£¬¶øÇÒÖ´ÐгÌÐòÓкÜÂÒ£¬ÈÃÄãÒ²ºÜ²»ºÃÕÒ£¬ÏÂÃæÕâ¸öÊÇÎÒÓÃjavaдµÄÒ»¶ÎС³ÌÐò£¬Ö±½ÓÔÚÄãµÄÔËÐд°¿ÚÊäÈë java open ??¾Í¿ÉÒÔ´ò¿ªÄã×Ô¼ºµÄÏëÒªµÄ»·¾³»òÕß¹¤¾ßÁË
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class open {
public static void main(String [] s){
Map m=new HashMap();//ʹÓÃmap¼¯ºÏ
m.put("cb","C:/Program Files/Kingsoft/PowerWord_Oxford/XDict.exe");//ͨ¹ý¼üÖµÀ´±£´æÄã¿ÉÖ´ÐгÌÐòµÄÎïÀí·¾¶
m.put("360","C:/Program Files/360/360safe/360Safe.exe");
m.put("flash","C:/Program Files/Macromedia/Flash 8/Flash.exe");
m.put("d8","C:/Program Files/Macromedia/Dreamweaver 8/Dreamweaver.exe");
m.put("flash","C:/Program Files/ipmsg/ipmsg.exe");
m.put("netBeans","C:/Program Files/NetBeans 6.5.1/bin/netbeans.exe");
m.put("php","C:/Program Files/Zend/Zend Studio for Eclipse - 6.1.2/ZendStudio.exe");
String ss=s[0];//³ÌÐòÆô¶¯Ê±¸ø³ÌÐò²ÎÊý¸³Öµ
try {
Runtime.getRuntime().exec((String)m.get(ss));//µ÷ÓóÌÐò
} catch (IOException e) {
System.out.println("³ÌÐòÔËÐдíÎó");
}
}
}
²»¹ýÕâ¸öÓÃjavaд»¹ÊDZȽϲ»ºÃÓõģ¬Ò»»áÎÒ¿´¿´ÔÚÓÃC#дһ¸öÕâÑùµÄС³ÌÐò
Ïà¹ØÎĵµ£º
Ò»¡¢JSON ÊÇʲô£¿
JSON µÄÈ«³ÆÊÇJavaScript Object Notation£¬ÊÇÒ»ÖÖÇáÁ¿¼¶µÄÊý¾Ý½»»»¸ñʽ¡£
JSON ÓëXML ¾ßÓÐÏàͬµÄÌØÐÔ£¬ÀýÈçÒ×ÓÚÈ˱àдºÍÔĶÁ£¬Ò×ÓÚ»úÆ÷Éú³ÉºÍ½âÎö¡£µ«ÊÇJSON ±È
XML Êý¾Ý´«ÊäµÄÓÐЧÐÔÒª¸ß³öºÜ¶à¡£JSON ÍêÈ«¶ÀÁ¢Óë±à³ÌÓïÑÔ£¬Ê¹ÓÃÎı¾¸ñʽ±£´æ¡£
JSON Êý¾ÝÓÐÁ½Öֽṹ£º
• Name-Value ¶Ô¹¹³ÉµÄ¼¯ ......
ÐèÒªdom4j.jarÎļþ £¬×ÔÐÐÏÂÔØ¡£ test.xml 1: <?xml version="1.0" encoding="gbk"?>
2:
3: <students>
4: <person sex="ÄÐ" age="21">
5: <id>1</id>
6: <name>ÕÂÖÎÅô</name>
7: <homepage&g ......
/**
* ÏÂÔØÎļþ
* @param filePath --ÎļþÍêÕû·¾¶
* @param response --HttpServletResponse¶ÔÏó
*/
public static void downloadFile(
String filePath,
javax.servlet.http.HttpServletResponse response) {
String fileName = ""; //ÎļþÃû£¬Êä³öµ½Óû§µÄÏÂÔØ¶Ô»°¿ò
//´ÓÎļþÍêÕû·¾¶ÖÐÌáÈ¡ÎļþÃû£¬²¢½øÐбà ......
Object Ordering
A List l may be sorted as follows.
Collections.sort(l);
If the List consists of String elements, it will be sorted into alphabetical order. If it consists of Date elements, it will be sorted into chronological order. How does this happen? String and Date both implement the Compara ......
Ò»¡¢Axis°²×° 1¡¢»·¾³ J2SE SDK 1.5 or 1.6: ÎÒʹÓà 1.6 Servlet Container: ÎÒʹÓõÄTomcat 6.0
2¡¢µ½ http://ws.apache.org/Axis/ÍøÕ¾ÏÂÔØAxis°²×°°ü
3¡¢ÏÈÔÚeclipseÏÂн¨web projectΪWebServiceDemo.ÔÚTomcatµÄÅäÖÃxmlÅäÖÃÉÏ£º<Context path="/webservice" docBase="D:\workspace\WebServiceDemo\WebRoot"/>. ......