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

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ÿÌìѧϰһµãµã 09.10.14

                                                   ......

java µ÷ÓÃmysql¿Í»§¶Ëµ¼È룬µ¼³öÊý¾Ý

 ×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë 
/**  
 * µ¼ÈëÊý¾Ý  
  * @param  ½Å±¾µÄµØÖ·ºÍÃû³Æ  
 * @return ÊÇ·ñ³ ......

JAVA»·¾³±äÁ¿ÉèÖÃ

¾ÙÀý×Ó˵Ã÷Ò»ÇС£
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 ......

javaÖйØÓÚʱ¼äÈÕÆÚ²Ù×÷µÄ³£Óú¯Êý

1.¼ÆËãijһÔ·ݵÄ×î´óÌìÊý
Calendar time=Calendar.getInstance();
time.clear();
time.set(Calendar.YEAR,year);
time.set(Calendar.MONTH,i-1);//×¢Òâ,Calendar¶ÔÏóĬÈÏÒ»ÔÂΪ0            
int day=time.getActualMaximum(Calendar.DAY_OF_MONTH);//±¾Ô·ݵÄÌìÊý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ