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

java °üµÄ±àд£¨package£©

(×¢Ò⣺ÏÂÃæÎļþ¶¼ÔÚf:\myjavaÖУ©
{
3¸öÔ´Îļþ£ºMyApp.java,MyLib.java,PrintSchool.java;
½¨Îļþ¼Ðorg\Jie
ÆäÖÐMyLibºÍPrintSchool·ÅÔÚ°üorg.JieÖУ¨import org.Jie)
ÔÚcmd.exeÖÐÔËÐÐ
    javac  -d org\Jie MyLib.java    //ÔÚorg\Jie\org\jieÉú³ÉÁËMyLib.classÎļþ£¬½«¸ÃÎļþ·Åµ½org\JieÏ£¬ÔÙɾµôorg\Jie\orgÎļþ¼Ð
    copy MyLib.java org\Jie     //½«MyLib·Åµ½org\JieÖÐ
    javac  -d org\Jie PrintSchool.java     //ÀàËÆMyLib²Ù×÷
    copy PrintSchool org\Jie
   
ÈçÉϾÍÉú³ÉÁËÒ»¸ö°üorg.Jie,¿Éͨ¹ýimport ÃüÁîÔÚÆäËûÀàÖÐÒýÓÃËü¡£
   Èç²âÊÔÀýMyApp
 ÔÚcmd.exeÖÐÔËÐÐ
   javac MyApp.java
   java MyApp   //  ×¢ÒâÈç¹ûMyAppÔÚÆäËû(java)°üÖÐ,ÀýÈçÔÚforall£¨×Ô¼º¶¨ÒåµÄ£©°üÖР   ¾ÍÒª¸ÄΪjava forall.MyApp¡£Èç¹ûÀàMyLibÓÐmainº¯Êý¾Í¿ÉÓÃÃüÁî java org.Jie.MyLibÔËÐÐMyLibÁË £¬µ±È»¸ÃÀýµÄMyLiÊDz»ÄÜÔËÐС£
   ¾Í¿ÉÔËÐÐMyAppÁË
}
{
¹ØÓÚÔËÐÐjarѹËõµÄÎļþ£º
    ÈÔÈ»ÓÃÉÏÀý£¬ÎÒ½«MyAppдÈë°üforallÖС£ÒòΪÎÒ²»ÖªµÀĬÈÏ°ü£¨·ÅÖ÷ÀàµÄ£©ÊÇʲô£¬ËùÒÔ¾Í×Ô¼º½¨ÁËÒ»¸ö°üforall¡£
ÎҸоõ¹é²¢Îļþ.jar¶¼±ØÐëÔÚ°üµÄÇ°ÌáϲÅÄÜÔËÐУ¬ÒòΪjarÎļþÀïÃæµÄMANIFEST.MFÎļþÐèÒªÖªµÀÖ÷ÀàµÄλÖá£ÒòΪMyAppÒýÓÃÁËÀàMyLiºÍÀàPrintSchool£¬ËùÒԹ鲢ÊÇÒª½«org\JieÒ²Òª¹é²¢½øÈ¥¡£
ÔÚcmd.exeÖÐÔËÐÐ
   jar   -cvf   MyApp.jar    forall   org\Jie  \\ÔÚmyjavaÏÂÉú³ÉÁËMyApp.jarÎļþ
ÓÃwinRAR´ò¿ªMyApp.jarµã½øÀïÃæµÄ META-INFÎļþ ½« MANIFEST.MFÎļþ ¸ÄΪ txtÎļþ
µã½øÈ¥ºó£¬ÔÚÎļþβÌí¼ÓÈçÏÂÓï¾ä
    Main-Class£º forall.MyApp
×¢Ò⣺ðºÅºóÖ»ÄÜÇÒ±ØÐë¿ÕÒ»¸ñºóÃæÊÇÖ÷ÀàµÄλÖ㬵±È»MyAppÊÇÖ÷ÀàÃû£¬²¢ÇÒ½áβҪÓлسµ¡£ 
±£´æÐ޸ĺó½«MANIFEST.TXT¸Ä»ØMANIFEST.MFÎļþ¡£
¾Í¿ÉÒÔÔËÐÐMyApp.jarÎļþÁË£¬ÓÃÈçÏÂÃüÁî
   java -jar MyApp.jar
  
µÃ³ö½á¹û
}  


Ïà¹ØÎĵµ£º

wikiϵͳ£¨JAVA£© ¹Û²ì


×î½üÏë¶ÔÓÚwikiϵͳµÄÔ´´úÂëÑо¿ÏÂ
 
jspwikiÊÇÒ»¸ö²»´íµÄwikiÒýÇ棬´¿jsp/servletдµÄ¡£JSPWiki²»Ê¹ÓÃÏֳɵÄÊý¾Ý¿â¹ÜÀíÈí¼þ£¬ËùÓеÄÎļþÒÔÎı¾ÎļþµÄÐÎʽ´æ·Å¡£ËüÀûÓÃÀàËÆCVSµÄ»úÖƱ£Ö¤ÁËÎļþ°æ±¾µÄÍêÕûÐÔ¡£Ö§³ÖÖÐÎÄ£¬Ö§³Ö°æ±¾±È½Ï¡¢È¨ÏÞ¹ÜÀíµÈ¹¦ÄÜ£¡
ÏîÄ¿Ö÷Ò³£º http://www.jspwiki.org/
ÎĵµµØÖ·£º  ......

[תÔØ]Java¿ª·¢×îÈÝÒ×·¸µÄ¼¸ÖÖ´íÎó

1.Duplicated Code
 
´úÂëÖظ´¼¸ºõÊÇ×î³£¼ûµÄÒìζÁË¡£ËûÒ²ÊÇRefactoringµÄÖ÷ҪĿ±êÖ®Ò»¡£´úÂëÖظ´ÍùÍùÀ´×ÔÓÚcopy-and-pasteµÄ±à³Ì·ç¸ñ¡£ÓëËûÏà¶ÔÓ¦OAOOÊÇÒ»¸öºÃϵͳµÄÖØÒª±êÖ¾¡£
 
2.Long method
 
ËüÊÇ´«Í³½á¹¹»¯µÄ“ÒŶ¾”¡£Ò»¸ö·½·¨Ó¦µ±¾ßÓÐ×ÔÎÒ¶ÀÁ¢µÄÒâͼ£¬²»Òª°Ñ¼¸¸öÒâͼ·ÅÔÚÒ»Æð¡£ ......

Ö÷Ì⣺Java³ÌÐòÔ±µÄ֪ʶ¼Ü¹¹Ç³Îö

×÷ΪJava³ÌÐòÔ±À´Ëµ£¬×îÍ´¿àµÄÊÂÇéĪ¹ýÓÚ¿ÉÒÔÑ¡ÔñµÄ·¶Î§Ì«¹ã£¬¿ÉÒÔ¶ÁµÄÊéÌ«¶à£¬ÍùÍùÈÝÒ×ÎÞËùÊÊ´Ó¡£ÎÒÏë¾ÍÎÒ×Ô¼º¶Á¹ýµÄ¼¼ÊõÊé¼®ÖÐÌôÑ¡³öÀ´Ò»Ð©£¬
°´ÕÕѧϰµÄÏȺó˳Ðò£¬ÍƼö¸ø´ó¼Ò£¬ÌرðÊÇÄÇЩÏë²»¶ÏÌá¸ß×Ô¼º¼¼ÊõˮƽµÄJava³ÌÐòÔ±ÃÇ¡£
Ò»¡¢Java±à³ÌÈëÃÅÀà
¶ÔÓÚûÓÐJava±à³Ì¾­ÑéµÄJava³ÌÐòÔ±ÒªÈëÃÅ£¬Ëæ±ã¶ÁʲôÈëÃÅÊé¼®¶¼Ò» ......

JavaÒì³£´¦Àí×ܽá£Ûת£Ý

http://lavasoft.blog.51cto.com/62575/18920
JavaÒì³£´¦Àí×ܽá
 
       
Òì³£´¦ÀíÊdzÌÐòÉè¼ÆÖÐÒ»¸ö·Ç³£ÖØÒªµÄ·½Ã棬ҲÊdzÌÐòÉè¼ÆµÄÒ»´óÄѵ㣬´ÓC¿ªÊ¼£¬ÄãÒ²ÐíÒѾ­ÖªµÀÈçºÎÓÃif...else...À´¿ØÖÆÒì³£ÁË£¬Ò²ÐíÊÇ×Ô·¢
µÄ£¬È»¶øÕâÖÖ¿ØÖÆÒ쳣ʹ¿à£¬Í¬Ò»¸öÒì³£»òÕß´íÎóÈç¹û¶à¸öµØ· ......

JAVA×Ö·û´®²Ù×÷

1¡¢   public class HelloWorld {
    public static void main(String args[]){
     String s="daxiong";
     System.out.println("Hello,World!"+"lu shenglong"+s);
     char c[]={'s','w','q'};
    &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ