JAVAÖÐjarÎļþµÄ±àдºÍÓ¦ÓÃ
http://www.cn-java.com/www1/?action-viewnews-itemid-3295
ÎÒÏë£Ê£Á£Ö£ÁµÄ°®ºÃÕߣ¬ÓÈÆäÊdzõѧÕß´ó¶¼ÓйýÕâÑùµÄ¾Àú£¬¾ÍÊÇϲ»¶£Ê£Á£Ö£Á±à³ÌÓïÑÔ£¨Õâ¸öÈ˵ÄÇé¿ö¿ÉÄܲ»Ò»Ñù£©£¬µ«ÊÇÓÐʱºò×Ü»á¾õµÃJAVAµÄÓŵã±ãÊÇËýµÄ“ÖÂÃü”µÄȱµã¡£´ó¼ÒµÄÐÅÄîÒÀ¾ÉÊÇ“Ò»´Î±àÒ룬µ½´¦ÔËÐДµ«ÊǾÍÊÇÒòΪÖÁÒ»µã£Ê£Á£Ö£ÁʧȥÁ˺ö࣬ÎÒÃÇҲʧȥÁ˺öࡣҲÐí´ó¼Ò¶¼ÖªµÀ£¬ÏÖÔÚÒµ½ç×îÍƳçµÄ»¹ÊÇ΢ÈíµÄ¼¼Êõ΢ÈíµÄ²úÆ·¡££®£î£å£ô£¯£ã££/£®£ö£â£¯£ö£â£®£î£å£ô»¹ÊÇ×îÁ÷ÐеÄÓïÑÔ£¬×îÊÜ»¶ÓµÄÈí¼þ¿ª·¢ÓïÑÔ¡£ÒòΪÕâЩÓïÑÔ¶¼Ì«ºÃѧ̫ºÃÓÃÁË¡£²»Ïñ£Ê£Á£Ö£ÁÓïÑÔÄÇôÄѶ®ÄÑÓá£ÔÚÈí¼þ¿ª·¢Ìá³ö¸ßЧµÄ×é¼þ¿ª·¢µÄʱºò£¬ÈËÃǶ¼ºÜÄÑÏëÏóÓÃJAVAµÄ£Å£Ê£Â¾ÍÐпª·¢£¬ÒòΪ²»³ÉÊìµÄ¼¼ÊõºÍ²»½¡È«µÄ£Á£Ð£É£¬ÈóÌÐòÔ±ºÜÄÑÈëÊÖ¡£ËäÈ»ÓÐJBuilderÕâÑùÓÅÐãµÄ¿ª·¢¹¤¾ß£¬µ«ÊÇÓÐʱ»¹ÊǺÜÄÑ×ÅÊֵģ¨ÒòΪËûÃǵÄÌåϵ̫¸´ÔÓ£¬¶ÔÓÚÒ»°ãÈËÀ´Ëµ»áÓÐÒ»µãµÄÄѶȣ¬µ±Ï뿪·¢Ó¦ÓóÌÐòµÄʱºò£©¡£JAVAµÄÌåϵ¹»¸´ÔÓÁË¡£ÒòΪ“¿çƽ̨=ÐÔ”ËùÒÔJAVAÓïÑÔ»òÕß˵JDK²»Ö§³Ö²úÉú.exeÎļþµÄÏàÓ¦µÄ£Á£Ð£É£¨Ó¦ÎªÉú³É£®£å£ø£åÎļþ×ÜÒªºÍϵͳµÄÓ²¼þÏà¹Ø£¬ÕâÊÇJAVAÓïÑÔËù²»ÓÃÐíµÄ£©¡£²»¹ýÄãҲûÓбØҪʧÍû£¬Ä㵫¿ÉÒÔʹÓÃJBuilder »òÕßIBMºÍÈíÈíµÄÖ§³Ö£Ê£Á£Ö£ÁÓïÑÔ¿ª¿ªµÄ¹¤¾ß¾ÍÐгÌÐò¿ª·¢ÓëÉè¼Æ£¬»òÕß²ÉÓãʣÁ£Ö£ÁµÄ£®£ê£á£ò¼¼Êõ½øÐÐÏà¹ØµÄ²Ù×÷£¬¼´Éú³É“Ë«»÷¾Í¿ÉÒÔÔËÐеģ®£ê£á£òÎļþ”£¬Õⲻʧһ¼þºÜºÃµÄÊÂÇé¡££¨¾ÝÎÒÁ˽âJBuilderÊDz»ÄÜÔËÐÐÔÚ256ÄÚ´æµÄ»úÆ÷Éϵģ¬¿É¼ûʵÔÚÌ«ºÄÄڴ棩¡£ºÃÁË£¬ÏÖÔÚÔÛÃÇÑÔ¹éÕý´«¡£×ÜÖ®£¬¡£jar Îļþ»¹ÊǺܹÜÓõġ£ÏÂÈÃÃæÔÛÃÇ¿ªÊ¼½øÈëÖ÷Ìâ¡£
Ò»¡¢ÖÆ×÷jarÎļþ
ÔÚÖÆ×÷.jar Îļþ֮ǰÄã±ØÐëÏȱàÒëºÃÄãµÄ.javaÎļþ¡£¼ÙÉèÎÒÃǵÄÎļþĿ¼ÊÇc:\java\myJava\hello\Hello.java
ÏÖÔÚ¼ÙÉèHello.javaµÄÎļþÄÚÈÝΪ£º
/*
*
* Hello.java
*
*/
public class Hello {
public static void mian(String[] args){
System.out.println("Hello, World !");
}
}
ÔÚ½øÐÐ.jar ÖÆ×÷µÄʱºòÄã±ØÐë°Ñ·¾¶Çл»µ½Hello.java ËùÔÚµÄÎļþĿ¼µÄÍâÒ»²ãÎļþ¼Ð(.jarÎļþÒªÔÚDos²ÅÄÜ´´½¨£¨windowsƽ̨£©)£¬¼´myJava
ÔËÐÐÈçϵÄÃüÁî¿ÉÒ԰ѵ±Ç°Îļþ¼ÐϵÄËùÓÐÄÚÈݶ¼°üº¬ÔÚ.jar ÎļþÄÚ¡£
c:\java\myJava>jar cf Hello.jar .
˵Ã÷һϣºÃüÁîÐÐÖÐ jar ÊÇÉú³É.jarÎļþµÄ³ÌÐòµÄµ÷Óýӿڡ£ cf ÊÇÒ»¶Ô¿ÉÑ¡Ïoptions£©ºóÃæµÄHello.jar ¾ÍÊÇÎÒÃǸøÎļþÈ¡µÄÃû×ÖÁË£¬×îºóÒ»¸öµãºÅ£¨.£
Ïà¹ØÎĵµ£º
1.»ù±¾¸ÅÄîµÄÀí½â
¾ø¶Ô·¾¶£º¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺
C:xyz est.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸öURL¾ø¶Ô·¾¶¡£
Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄÏà¶Ô·¾¶£¨HTMLÖеÄÏà¶ÔĿ¼£©£¬ÀýÈ磺ÔÚ
ServletÖÐ ......
À¬»ø»ØÊÕÆ÷ÊÇÈçºÎ¹¤×÷µÄ£¿ÎÒÏÖÔھͼòµ¥µÄ½éÉÜÒ»ÏÂ
Ê×ÏÈÒªÃ÷È·¼¸µã£º
JavaÊÇÔÚ¶ÑÉÏΪ¶ÔÏó·ÖÅä¿Õ¼äµÄ
À¬»ø»ØÊÕÆ÷Ö»¸úÄÚ´æÓйأ¬Ê²Ã´IO°¡£¬ÍøÂçÁ¬½Ó°¡£¬¹ÜËüPÊÂ
µ±¿ÉÓÃÄÚ´æÊýÁ¿½ÏµÍʱ£¬Sun°æ±¾µÄÀ¬»ø»ØÊÕÆ÷²Å»á±»¼¤»î
ÔÚÀ¬»ø»ØÊÕÆ÷»ØÊÕÀ¬»ø֮ǰ£¬ÎÒÃÇÏÈÀ´Á˽âÒ»ÏÂJava·ÖÅä¶ÔÏóµÄ·½Ê½£¬JavaµÄ¶Ñ¸üÏñÒ»¸ö´«ËÍ´ø£¬Ã¿·ÖÅäÒ» ......
µÚÒ»¸ö½×¶Î£¨»ù´¡½×¶Î£©
1¡¢ÄãÒªÕÆÎÕHTMLÓïÑÔ£¬ÈÏʶ³£ÓõÄHTMLһЩ±êÇ©¡£ÎÒÍƼö´ó¼ÒѧϰËïöÎÀÏʦÊÓƵµÄ¡¶HTMLÓïÑÔËٳɡ·
2¡¢ÕÆÎÕJAVA»ù´¡£¬Ò²¾ÍÊÇJ2SE£¬ÎÒÍƼö´ó¼ÒѧϰÂíÊ¿±øÀÏʦµÄJ2SEÊÓƵ¡£µ±Ê±ÎÒѧϰJ2SEÖ÷Ҫѧϰ
µÄÕÅТÏéºÍËïöÎÀÏʦµÄÊÓƵ£¨µ±Ê±»¹²»ÖªµÀÂíÊ¿±øÀÏʦÄØ£¡ºÇºÇ£©²»¹ýÎÒÈÏΪËïöÎÀÏʦǰÃ漸½²»¹ÊÇ ......
½ñÌìдÁËÒ»¸ö¶¨Ê±É¾³ýÎļþµÄС³ÌÐò£¬ÓÃexe4j½«Æäת»»³Éexe¸ñʽµÄ¿ÉÖ´ÐÐÎļþ¡£
package egtl.test;
import java.io.File;
import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
public class FileDeleter extends TimerTask {
private stati ......