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

java verboseÃüÁî

java -verbose[:class|gc|jni] ÔÚÊä³öÉ豸ÉÏÏÔʾÐéÄâ»úÔËÐÐÐÅÏ¢¡£
1.java -verbose:class
ÔÚ³ÌÐòÔËÐеÄʱºò¾¿¾¹»áÓжàÉÙÀà±»¼ÓÔØÄØ£¬Ò»¸ö¼òµ¥³ÌÐò»á¼ÓÔØÉÏ°Ù¸öÀàµÄ£¡Äã¿ÉÒÔÓÃverbose:classÀ´¼àÊÓ£¬ÔÚÃüÁîÐÐÊäÈëjava -verbose:class XXX  (XXXΪ³ÌÐòÃû)Äã»áÔÚ¿ØÖÆ̨¿´µ½¼ÓÔصÄÀàµÄÇé¿ö¡£
 verboseºÍverbose:classº¬ÒåÏàͬ£¬Êä³öÐéÄâ»ú×°ÈëµÄÀàµÄÐÅÏ¢£¬ÏÔʾµÄÐÅÏ¢¸ñʽÈçÏ£º [Loaded java.io.FilePermission$1 from shared objects file] µ±ÐéÄâ»ú±¨¸æÀàÕÒ²»µ½»òÀà³åͻʱ¿ÉÓô˲ÎÊýÀ´Õï¶ÏÀ´²é¿´ÐéÄâ»ú´Ó×°ÈëÀàµÄÇé¿ö¡£
2.java –verbose:gc
ÔÚÐéÄâ»ú·¢ÉúÄÚ´æ»ØÊÕʱÔÚÊä³öÉ豸ÏÔʾÐÅÏ¢£¬¸ñʽÈçÏ£º [Full GC 268K->168K(1984K), 0.0187390 secs] ¸Ã²ÎÊýÓÃÀ´¼àÊÓÐéÄâ»úÄÚ´æ»ØÊÕµÄÇé¿ö¡£
01 public class TestGC{¡¡
02
03       public static void main(String[] args)¡¡{¡¡¡¡
04
05 TestGC test = new TestGC();¡¡¡¡
06
07 System.gc();¡¡
08
09 }
10
11 }
ÔÚÕâ¸öÀý×ÓÖУ¬Ò»¸öеĶÔÏó±»´´½¨£¬ÓÉÓÚËüûÓÐʹÓã¬ËùÒԸöÔÏóѸËٵرäΪ¿É´ï£¬³ÌÐò±àÒëºó£¬Ö´ÐÐÃüÁ java -verbose:gc TestGC ºó½á¹ûΪ£º
[Full GC 168K->97K(1984K)£¬ 0.0253873 secs]
»úÆ÷µÄ»·¾³Îª£¬Windows 2000 + JDK1.3.1£¬¼ýÍ·Ç°ºóµÄÊý¾Ý168KºÍ97K·Ö±ð±íʾÀ¬»øÊÕ¼¯GCÇ°ºóËùÓдæ»î¶ÔÏóʹÓõÄÄÚ´æÈÝÁ¿£¬ËµÃ÷ÓÐ168K-97K=71KµÄ¶ÔÏóÈÝÁ¿±»»ØÊÕ£¬À¨ºÅÄÚµÄÊý¾Ý1984KΪ¶ÑÄÚ´æµÄ×ÜÈÝÁ¿£¬ÊÕ¼¯ËùÐèÒªµÄʱ¼äÊÇ0.0253873Ã루Õâ¸öʱ¼äÔÚÿ´ÎÖ´ÐеÄʱºò»áÓÐËù²»Í¬£©¡£
3.java –verbose:jni
-verbose:jniÊä³önative·½·¨µ÷ÓõÄÏà¹ØÇé¿ö£¬Ò»°ãÓÃÓÚÕï¶Ïjniµ÷ÓôíÎóÐÅÏ¢¡£
ÔÚÐéÄâ»úµ÷ÓÃnative·½·¨Ê±Êä³öÉ豸ÏÔʾÐÅÏ¢£¬¸ñʽÈçÏ£º [Dynamic-linking native method HelloNative.sum ... JNI] ¸Ã²ÎÊýÓÃÀ´¼àÊÓÐéÄâ»úµ÷Óñ¾µØ·½·¨µÄÇé¿ö£¬ÔÚ·¢Éújni´íÎóʱ¿ÉΪÕï¶ÏÌṩ±ãÀû¡£


Ïà¹ØÎĵµ£º

һЩ³£¼ûJavaÒì³£¹éÀà(¶þ)

ËãÊõÒì³£ÀࣺArithmeticExecption
¡¡¡¡¿ÕÖ¸ÕëÒì³£ÀࣺNullPointerException
¡¡¡¡ÀàÐÍÇ¿ÖÆת»»Òì³££ºClassCastException
¡¡¡¡Êý×鸺ϱêÒì³££ºNegativeArrayException
¡¡¡¡Êý×éϱêÔ½½çÒì³££ºArrayIndexOutOfBoundsException
¡¡¡¡Î¥±³°²È«Ô­ÔòÒì³££ºSecturityException
¡¡¡¡ÎļþÒѽáÊøÒì³££ºEOFException
¡¡¡¡ÎļþÎ´Õ ......

JAVAÒì³£×Ü½á ¼Ì³Ð

ÒÔÏÂÊǶÔJAVAÒì³£µÄ¼Ì³Ð»úÖƵÄһЩ×ܽᡣ
1. RuntimeExceptionÓëException, Error²»Í¬µã£º µ±·½·¨ÌåÖÐÅ׳ö·ÇRuntimeException£¨¼°Æä×ÓÀࣩʱ£¬·½·¨Ãû±ØÐëÉùÃ÷Å׳öµÄÒì³££»µ«Êǵ±·½·¨ÌåÖÐÅ׳öRuntimeException£¨°üÀ¨RuntimeException×ÓÀࣩʱ£¬·½·¨Ãû²»±ØÉùÃ÷¸Ã¿ÉÄܱ»Å׳öµÄÒì³££¬¼´Ê¹ÉùÃ÷ÁË£¬JAVA³ÌÐòÔÚij¸öµ÷Óõĵط½£¬Ò² ......

java servlet ÂÒÂë

javaдÎļþÂÒÂë
StringBuffer sb = new StringBuffer();
  sb.append("<table  border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"b5d6e6\"");
  sb.append("<tr>");
  sb.append("<td bgcolor=\"#FFFFFE\" height=\"42\" colspan=\""+ (jsd ......

JAVA¶¨Ê±Æ÷ Timer+TimerTask

     ±¾ÎÄÊ×ÏÈÉè¼ÆÒ»¸öµ¥´Î¶¨Ê±Æ÷Timer+TimerTask£¬È»ºóÔٴλù´¡ÉÏÉè¼ÆÒ»¸öÑ­»·¶¨Ê±Æ÷¡£
     ÎÒ½«°Ñ java.util.Timer ºÍ java.util.TimerTask ͳ³ÆΪ Java ¼ÆʱÆ÷¿ò¼Ü£¬ËüÃÇʹ³ÌÐòÔ±¿ÉÒÔºÜÈÝÒ׵ؼƻ®¼òµ¥µÄÈÎÎñ£¨×¢ÒâÕâЩÀàÒ²¿ÉÓÃÓÚ J2ME ÖУ©¡£²»¹ý£¬Java ¼ÆʱÆ÷¿ò¼ÜûÓÐ× ......

javaµÄһЩ³£Óðü

commons-digester.jar
Digester»ùÓÚ¹æÔòµÄXMLÎĵµ½âÎö,Ö÷ÒªÓÃÓÚXMLµ½Java¶ÔÏóµÄÓ³Éä.
commons-beanutils.jar
Ìṩ¶ÔJava ·´ÉäºÍ×ÔÊ¡APIµÄ°ü×°.
aspectjweaver.jar
ÓÃÓÚÔÚSpring 2.0Öм¯³ÉAspectJ AspectJ LTWÖ¯ÈëÆ÷
ognl.jar
OGNLÊÇObject-Graph Navigation LanguageµÄËõд£¬ËüÊÇÒ»ÖÖ¹¦ÄÜÇ¿´óµÄ±í´ïʽÓïÑÔ£¨E ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ