Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java½â¾öÖ¸¶¨Ó¦ÓóÌÐò´ò¿ªÖ¸¶¨Îļþ

 //´ò¿ª¹¤¾ßµÄ·¾¶¼°Ãû×Ö
String toolsPath = "D:/office/Office12/WINWORD.EXE";
//±»´ò¿ªÎļþµÄ·¾¶¼°Ãû×Ö
String fileName = " D:/test.doc";
try {
     Process p = Runtime.getRuntime().exec(toolsPath+fileName);
} catch (IOException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
}
´Ë·½·¨¿ÉÒÔʵÏÖÓÃJAVAÖ¸¶¨¹¤¾ß´ò¿ªÖ¸¶¨Îļþ£¬ÈçÓÃJS¿ÉÒÔÓÃAJAXµ÷ÓÃ


Ïà¹ØÎĵµ£º

javaÖлñÈ¡Îļþ·¾¶µÄ¼¸ÖÖ·½Ê½

 ¹ØÓÚ¾ø¶Ô·¾¶ºÍÏà¶Ô·¾¶£º
¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺C:xyz est.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸öURL¾ø¶Ô·¾¶¡£Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄÏà¶Ô·¾¶£¨HTMLÖеÄÏà¶ÔĿ¼£©£¬ÀýÈ磺ÔÚServletÖУ¬" ......

Java Socket ³¤Á¬½ÓͨÐÅ

 ×î½üÏîÄ¿ÖÐÓиöÐèÇó£¬ÒªÓÃSocketʵÏÖ³¤Á¬½Ó£¬²¢ÇÒÔÚͨÐŹý³ÌÖÐÒª»¥ÎªserverºÍclient£¬¼´ÔÚÒ»¸öÁ¬½ÓÖУ¬¼ÈÄܹ»·¢ËÍÏûÏ¢£¬£¨´Ëʱ×÷Ϊ¿Í»§¶Ë£©£¬ÓÖÒªÄܹ»½ÓÊÕÏûÏ¢£¨´Ëʱ×÷Ϊserver¶Ë£©£¬Ñо¿ÁËÏ£¬ÊµÏÖ·½Ê½ÈçÏ£º
Ò»¡¢·¢ËÍÏûϢʱ½¨Á¢Á¬½Ó£¬¹¹½¨Í¨µÀ¡£
Socket socket = new Socket();
SocketAddress endpoint = new In ......

java²¢·¢±à³Ìʵ¼ù±Ê¼Ç

 1, ±£Ö¤Ḭ̈߳²È«µÄÈýÖÖ·½·¨:
    a, ²»Òª¿çÏ̷߳ÃÎʹ²Ïí±äÁ¿
    b, ʹ¹²Ïí±äÁ¿ÊÇfinalÀàÐ͵Ä
    c, ½«¹²Ïí±äÁ¿µÄ²Ù×÷¼ÓÉÏͬ²½
2, Ò»¿ªÊ¼¾Í½«ÀàÉè¼Æ³ÉḬ̈߳²È«µÄ, ±ÈÔÚºóÆÚÖØÐÂÐÞ¸´Ëü,¸üÈÝÒ×.
3, ±àд¶àÏ̳߳ÌÐò, Ê×Ïȱ£Ö¤ËüÊÇÕýÈ·µÄ, Æä´ÎÔÙ¿¼ÂÇÐÔÄÜ.
4, ÎÞ×´Ì ......

JAVA±àÂë»úÖÆ

 javaÖÐËùÓж¼ÊÇunicodeµÄ±àÂ룬¿ÖÅ´ó¼Ò¶¼Çå³þ£¬µ«ÊÇÕâ¾ßÌåÊÇÄÄÀïµÄ±àÂë¡£ÔÚһ̨ÖÐÎÄwindows²Ù×÷ϵͳ£¨GBK£©£¬»òÓ¢ÎĵÄlinux²Ù×÷ϵͳÏ£¨ISO-8859-1£©Ï£¬ÕâЩ±àÂëÊÇÈçºÎת»»µÄ¡£JAVAÖеÄStringÀàµÄgetBytes()·½·¨ºÍStringÀàµÄÖ¸¶¨±àÂ뷽ʽµÄ¹¹Ô캯ÊýÖеıàÂëÓÖÊÇÈçºÎÄØ£¿
ÕâÀïÎÒ²»×öÉîÈë½âÊÍ£¬Ö»ÊÇչʾһÏÂÕâЩ±àÂë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ