JDKÖаüº¬µÄ³£ÓÃJavaµ÷ÊÔ¹¤¾ß
1 JDK5.0°üÀ¨µÄµ÷ÊÔ¹¤¾ß
ÎÒÃÇÔÚÕâÀï¶ÔJDK5.0µÄµ÷ÊÔ¹¤¾ß×ö´óÖµĸÅÄîÐԵĽéÉÜ£¬È»ºóÏ£Íûͨ¹ý½éÉÜÎÒ×Ô¼ºÔÚʵ¼Ê¹¤×÷ÖÐʹÓÃÕâЩ¹¤¾ß½â¾öÎÊÌâµÄʵÀýÀ´Èôó¼Ò¶ÔÕâЩ¹¤¾ßÓиüÉîÈëµÄÁ˽⡣
¡¡JDK5.0ÀïÃæ¼ÓÈëÁËjstack, jconsole, jinfo, jmap, jdb, jstat, jps, ÏÂÃæ¶ÔÕâЩ¹¤¾ß×ö¼òµ¥½éÉÜ£º
¡¡jstack -- Èç¹ûjava³ÌÐò±ÀÀ£Éú³ÉcoreÎļþ£¬jstack¹¤¾ß¿ÉÒÔÓÃÀ´»ñµÃcoreÎļþµÄjava stackºÍnative stackµÄÐÅÏ¢£¬´Ó¶ø¿ÉÒÔÇáËɵØÖªµÀjava³ÌÐòÊÇÈçºÎ±ÀÀ£ºÍÔÚ³ÌÐòºÎ´¦·¢ÉúÎÊÌâ¡£ÁíÍ⣬jstack¹¤¾ß»¹¿ÉÒÔ¸½Êôµ½ÕýÔÚÔËÐеÄjava³ÌÐòÖУ¬¿´µ½µ±Ê±ÔËÐеÄjava³ÌÐòµÄjava stackºÍnative stackµÄÐÅÏ¢, Èç¹ûÏÖÔÚÔËÐеÄjava³ÌÐò³ÊÏÖhungµÄ״̬£¬jstackÊǷdz£ÓÐÓõġ£Ä¿Ç°Ö»ÓÐÔÚSolarisºÍLinuxµÄJDK°æ±¾ÀïÃæ²ÅÓС£
¡¡jconsole – jconsoleÊÇ»ùÓÚJava Management Extensions (JMX)µÄʵʱͼÐλ¯¼à²â¹¤¾ß£¬Õâ¸ö¹¤¾ßÀûÓÃÁËÄÚ½¨µ½JVMÀïÃæµÄJMXÖ¸ÁîÀ´ÌṩʵʱµÄÐÔÄܺÍ×ÊÔ´µÄ¼à¿Ø£¬°üÀ¨ÁËJava³ÌÐòµÄÄÚ´æʹÓã¬Heap size, Ï̵߳Ä״̬£¬ÀàµÄ·ÖÅä״̬ºÍ¿Õ¼äʹÓõȵȡ£
¡¡jinfo – jinfo¿ÉÒÔ´ÓcoreÎļþÀïÃæÖªµÀ±ÀÀ£µÄJavaÓ¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¬Ä¿Ç°Ö»ÓÐÔÚSolarisºÍLinuxµÄJDK°æ±¾ÀïÃæ²ÅÓС£
¡¡jmap – jmap ¿ÉÒÔ´ÓcoreÎļþ»ò½ø³ÌÖлñµÃÄÚ´æµÄ¾ßÌåÆ¥ÅäÇé¿ö£¬°üÀ¨Heap size, Perm sizeµÈµÈ£¬Ä¿Ç°Ö»ÓÐÔÚSolarisºÍLinuxµÄJDK°æ±¾ÀïÃæ²ÅÓС£
¡¡jdb – jdb ÓÃÀ´¶ÔcoreÎļþºÍÕýÔÚÔËÐеÄJava½ø³Ì½øÐÐʵʱµØµ÷ÊÔ£¬ÀïÃæ°üº¬Á˷ḻµÄÃüÁî°ïÖúÄú½øÐе÷ÊÔ£¬ËüµÄ¹¦ÄܺÍSun studioÀïÃæËù´øµÄdbx·Ç³£ÏàËÆ£¬µ« jdbÊÇרÃÅÓÃÀ´Õë¶ÔJavaÓ¦ÓóÌÐòµÄ¡£
¡¡jstat – jstatÀûÓÃÁËJVMÄÚ½¨µÄÖ¸Áî¶ÔJavaÓ¦ÓóÌÐòµÄ×ÊÔ´ºÍÐÔÄܽøÐÐʵʱµÄÃüÁîÐеļà¿Ø£¬°üÀ¨Á˶ÔHeap sizeºÍÀ¬»ø»ØÊÕ×´¿öµÄ¼à¿ØµÈµÈ¡£
¡¡jps – jpsÊÇÓÃÀ´²é¿´JVMÀïÃæËùÓнø³ÌµÄ¾ßÌå״̬, °üÀ¨½ø³ÌID£¬½ø³ÌÆô¶¯µÄ·¾¶µÈµÈ¡£
¡¡ÁíÍ⣬»¹ÓÐЩÆäËû¸½´øµÄ¹¤¾ßÔÚÕâÀïûÓÐÁгö£¬±ÈÈçHeap Analysis Tool, kill -3 ·½·¨µÈµÈ£¬ÕâЩÔÚJDK5.0֮ǰ¾ÍÓУ¬Í¬ÑùÒ²ÊǷdz£ÓÐÓõÄÐÔÄܵ÷ÓŹ¤¾ß£¬´ó¼Ò¿ÉÒÔ²ÎÕÕÏàÓ¦µÄÎĵµ×ÊÁÏÀ´Ñ§Ï°£¬ÔÚÎÄÕºóÃæÒ²»áÍƼöһЩÏàÓ¦µÄÎĵµ¸ø´ó¼Ò×÷Ϊ²Î¿¼¡£
ÔÚ×ö¹ýµÄÏîÄ¿ÖУ¬Ôø¾Óм¸¸öÊÇʹÓÃjstackºÍjconsoleÀ´½â¾öÎÊÌâµÄ¡£
(ÒýÓãºhttp://java.chinaitlab.com/JDK/725690.html)
Ïà¹ØÎĵµ£º
¡¶javaÓïÑÔ³ÌÐòÉè¼Æ£¨Ò»£©¡·2009Äê×Ôѧ¿¼ÊÔ´ó¸ÙµÚ4ÕÂ
www.wesiedu.com 2009-5-5 ÔÚÏßÄ£Ä⿼³¡
µÚ4Õ Êý×éºÍ×Ö·û´®
(Ò»)¿Î³ÌÄÚÈÝ
4.1 Êý×é
4.1.1 һάÊý×é
4.1.2 ¶àάÊý×é
4.2 ×Ö·û´®
4.2.1 ×Ö·û´®³£Á¿
4.2.2 ×Ö·û´®ÉùÃ÷ºÍ´´½¨
4.2.3 ×Ö·û´®»ù±¾²Ù×÷
4.2.4 StringTokenizerÀà
4.2.5×Ö· ......
1£®JavaµÄ¼òµ¥ÀàÐͼ°Æä·â×°Æ÷Àà
¢ÅJava¼òµ¥ÀàÐÍÓë·â×°Àà
ÎÒÃÇÖªµÀ,JavaÓïÑÔÊǵäÐ͵ÄÖ§³ÖÃæÏò¶ÔÏóµÄ³ÌÐòÓïÑÔ,µ«¿¼Âǵ½ÓÐЩ»ù±¾Êý¾ÝÀàÐ͵Ľṹ¼òµ¥,Õ¼ÄÚ´æСÇÒ´æÈ¡ËٶȿìµÈÓŵã,JavaÒÀÈ»ÌṩÁ˶ÔÕâЩ·ÇÃæÏò¶ÔÏóµÄ¼òµ¥Êý¾ÝÀàÐ͵ÄÖ§³Ö¡£µ±È»,JavaÔÚÌṩ´óÁ¿µÄÆäËüÀàʱ,Ò²ÌṩÁËÓë¼òµ¥Êý¾ÝÀàÐͶÔÓ¦µÄ·â×°Àà,ÓÚÊÇ,JavaÖ ......
´úÂëÈçÏ£º
1 String command = " cmd /c C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqldump -h localhost -u root -p aijia > E:/aijia.dmp " ;
2 try {
3 Process process& ......
¾ÙÀý×Ó˵Ã÷Ò»ÇС£
JAVA_HOME£º C:\j2sdk1.4.2_13
Path£º C:\j2sdk1.4.2_13\bin;
Classpath£º.;JAVA_HOME\lib\tools.jar ; JAVA_HOME\lib\dt.jar;
&n ......
1¡¢FACTORY£¨¹¤³§Ä£Ê½£©
2¡¢BUILDER£¨½¨Ôìģʽ£©
3¡¢FACTORY METHOD£¨¹¤³§·½·¨Ä£Ê½£©
4¡¢PROTOTYPE£¨ÔʼģÐÍģʽ£©
5¡¢SINGLETON£¨µ¥Àýģʽ£©
6¡¢ADAPTER£¨ÊÊÅäÆ÷ģʽ£©
7¡¢BRIDGE£¨ÇÅÁºÄ£Ê½£©
8¡¢COMPOSITE£¨ºÏ³Éģʽ£©
9¡¢DECORATOR£¨×°ÊÎģʽ£©
10¡¢FACADE£¨ÃÅÃæģʽ£©
11¡¢FLYWEIGHT£¨ÏíԪģʽ£© ......