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

JavaѹËõÓë½âѹrarÎļþ

package com.sunz.fileUpload;
public class RarToFile {
   
    //cmd ѹËõÓë½âѹËõÃüÁî
    private static String rarCmd = "C:\\Program Files\\WinRAR\\Rar.exe a ";
    private static String unrarCmd = "C:\\Program Files\\WinRAR\\UnRar x ";
    /**
     * ½«1¸öÎļþѹËõ³ÉRAR¸ñʽ rarName ѹËõºóµÄѹËõÎļþÃû(²»°üº¬ºó׺) fileName ÐèҪѹËõµÄÎļþÃû(±ØÐë°üº¬Â·¾¶) destDir
     * ѹËõºóµÄѹËõÎļþ´æ·Å·¾¶
     */
    public static void RARFile(String rarName, String fileName, String destDir) {
        rarCmd += destDir + rarName + ".rar " + fileName;
        try {
            Runtime rt = Runtime.getRuntime();
            Process p = rt.exec(rarCmd);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
    /**
     * ½«1¸öRARÎļþ½âѹ rarFileName ÐèÒª½âѹµÄRARÎļþ(±ØÐë°üº¬Â·¾¶ÐÅÏ¢ÒÔ¼°ºó׺) destDir ½âѹºóµÄÎļþ·ÅÖÃĿ¼
     */
    public static void unRARFile(String rarFileName, String destDir) {
        unrarCmd += rarFileName + " " + destDir;
        try {
            Runtime rt = Runtime.getRuntime();
            Process p = rt.exec(unrarCmd);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
 


Ïà¹ØÎĵµ£º

JAVAµÄÈÝÆ÷ List,Map,Set

JAVAµÄÈÝÆ÷---List,Map,Set
Collection
©ÀList
©¦©ÀLinkedList
©¦©ÀArrayList
©¦©¸Vector
©¦¡¡©¸Stack
©¸Set
Map
©ÀHashtable
©ÀHashMap
©¸WeakHashMap
Collection½Ó¿Ú
¡¡¡¡CollectionÊÇ×î»ù±¾µÄ¼¯ºÏ½Ó¿Ú£¬Ò»¸öCollection´ú±íÒ»×éObject£¬¼´CollectionµÄÔªËØ£¨Elements£©¡£Ò»Ð© CollectionÔÊÐíÏà ......

JAVAÏß³ÌÖеÄÊØ»¤Ị̈߳¨Daemon£©

ÊØ»¤Ị̈߳¨Daemon£©
JavaÓÐÁ½ÖÖThread£º“ÊØ»¤Ïß³ÌDaemon”Óë“Óû§Ïß³ÌUser”¡£
ÎÒÃÇ֮ǰ¿´µ½µÄÀý×Ó¶¼ÊÇÓû§£¬ÊØ»¤Ïß³ÌÊÇÒ»ÖÖ“ÔÚºǫ́ÌṩͨÓÃÐÔÖ§³Ö”µÄỊ̈߳¬Ëü²¢²»ÊôÓÚ³ÌÐò±¾Ìå¡£
´Ó×ÖÃæÉÏÎÒÃǺÜÈÝÒ×½«ÊØ»¤Ïß³ÌÀí½â³ÉÊÇÓÉÐéÄâ»ú£¨virtual machine£©ÔÚÄÚ²¿´´½¨µÄ£¬¶øÓû§Ïß³ÌÔòÊÇ×Ô ......

JavaÖÐNative¹Ø¼ü×Ö

Java²»ÊÇÍêÃÀµÄ£¬JavaµÄ²»×ã³ýÁËÌåÏÖÔÚÔËÐÐËÙ¶ÈÉÏÒª±È´«Í³µÄC++ÂýÐí¶àÖ®Í⣬JavaÎÞ·¨Ö±½Ó·ÃÎʵ½²Ù×÷ϵͳµ×²ã£¨ÈçϵͳӲ¼þµÈ)£¬Îª´ËJavaʹÓÃnative·½·¨À´À©Õ¹Java³ÌÐòµÄ¹¦ÄÜ¡£
¿ÉÒÔ½«native·½·¨±È×÷Java³ÌÐòͬ£Ã³ÌÐòµÄ½Ó¿Ú£¬ÆäʵÏÖ²½Ö裺
£±¡¢ÔÚJavaÖÐÉùÃ÷native()·½·¨£¬È»ºó±àÒ룻
£²¡¢ÓÃjavah²úÉúÒ»¸ö.hÎļþ£»
£³¡¢Ð´Ò ......

JavaÏà¶Ô·¾¶/¾ø¶Ô·¾¶×ܽá(ת£©

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

javaÖÐÄÚ²¿ÀàµÄʹÓÃ

ÄÚ²¿ÀàµÄʹÓõÄÓÅȱµã£º
Óŵ㣺¼õÉÙÁËÔÚÀàÎļþ±àÒëºóµÄ²úÉúµÄ×Ö½ÚÂëÎļþµÄ´óС
ȱµã£ºÊ¹³ÌÐò½á¹¹²»ÇåÎú
ʹÓÃÄÚ²¿ÀàµÄ×¢ÒâÊÂÏ
ÄÚ²¿ÀàµÄʹÓÃÒ»°ã¶¼ÓëËùÔÚµÄÍⲿÀàÓÐÒ»¶¨µÄ¹ØÁª£¬ËüÊÇÔÚÒ»¸öÀàµÄÄÚ²¿Ç¶Ì׶¨ÒåµÄÀ࣬Ëü¿ÉÒÔÊÇÆäËüÀàµÄ³ÉÔ±£¬Ò²¿ÉÒÔÔÚÒ»¸öÓï¾ä¿éµÄÄÚ²¿¶¨Ò壬»¹¿ÉÒÔÔÚ±í´ïʽÄÚ²¿ÄäÃû¶¨Òå(ÄäÃûÄÚ²¿Àà)¡£
ÄÚ²¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ