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

JavaÐéÄâ»úÄÚ´æµ÷Õû

JavaÐéÄâ»úĬÈÏ·ÖÅä64MÄڴ棬Èç¹ûÄãµÄÓ¦ÓñȽϴ󣬳¬³ö64MÄڴ棬JavaÐéÄâ»ú¾Í»áÅ׳öOutOfMemoryError£¬²¢Í£Ö¹ÔËÐС£²»¹ÜÊÇʲôӦÓã¨WebÓ¦Óá¢ApplicationµÈ£©£¬Ö»ÐèÒªÐÞ¸ÄÄãµÄ»úÆ÷ÉϵÄÔËÐÐJavaÃüÁÔÚjava xxxÃüÁîÖÐÌí¼Ó-Xms(×îСʹÓÃÄÚ´æ)¡¢-Xmx£¨×î´óʹÓÃÄڴ棩¼´¿É½â¾ö¡£µ±È»£¬Õâ¶ùµÄÄÚ´æÈÝÁ¿¶¼ÊÇÖ¸ÎïÀíÄڴ棬²»Äܳ¬³öÄãµÄ»úÆ÷µÄÎïÀíÄÚ´æµÄ×ÜÈÝÁ¿¡£
¹ØÓÚÈçºÎÉèÖÃJVM²ÎÊý
ÔÚTomcat4.xÖУ¬¿ÉÒÔͨ¹ýÔÚ$TOMCAT/bin/catalina.batÖÐÉèÖÃ
CATALINA_OPTS²ÎÊýÀ´ÉèÖÃJVM²ÎÊý
±ÈÈç
set CATALINA_OPTS=-Xms256m -Xmx256m
                  -XX:NewSize=64m
                  -XX:MaxNewSize=64m
                  -XX:SurvivorRatio=10
²ÎÊýº¬ÒåÈçÏ£º
1£¬-Xms  ÉèÖÃJava heap(¶Ñ£©µÄ³õʼ»¯´óС
2£¬-Xmx  ÉèÖÃJava heap  µÄ×î´óÖµ
3£¬-XX:NewSize Èç¹û³õʼ»¯´óС²»×㣬°´Õմ˲ÎÊý¾ö¶¨ÐÂÔöµÄÄÚ´æ´óС
4£¬-XX:MaxNewSize ÉèÖÃ×î´ó¿ÉÒÔÐÂÔöÄÚ´æ
5,-XX:SurvivorRatio set the ration of nursery-to-surriovr space
ת×Ô£ºhttp://jeans.javaeye.com/blog/203086


Ïà¹ØÎĵµ£º

ÁíÎÒÓôÃÆÖÂËÀµÄJAVA socketÎÊÌâ

ͬÑùµÄ³ÌÐò£¬ÔÚ±ðÈ˵ĵçÄÔÉ϶¼¿ÉÒÔÓã¬ÔÚÎҵĵçÄÔÉÏÈ´ÎÞÂÛÈçºÎ¶¼Í¨²»¹ý£¬ÓôÃÆ°¡¡£
×òÌìÓöµ½Ò»¸öÎÊÌâ¸ãÁËÒ»Ì춼ûÓнâ¾ö£¬
Õâ¸ö³ÌÐòÔÚ±ðÈ˵ĵçÄÔÉÏÓö¼¿ÉÒÔͨ¹ý£¬Ö»ÓÐÔÚÎҵĵçÄÔÉÏÎÞ·¨Í¨¹ý
£¬ÎÒÒ»¿ªÊ¼×°µÄÊÇJDK6.0£¬ºóÀ´Ð¶ÔØÁË×°³ÉÁËJDK5.0£¨ÎªÁ˺ÍËùѧ½Ì³Ì±£³ÖÒ»Ö£¬
ÒÔ¼°ÎÒËÞÉáͨ¹ý²âÊԵĻúÆ÷Ò²ÊÇ×°µÄJDK5.0£©£¬
µ«ÊÇ ......

java URI URL ¸öÈËÀí½â¡£

URI ÊÇ×ÊÔ´±êʶ·û¡£¾ÍÊÇÏ൱ÓÚÒ»¸öÈ˵ļÒͥסַ¡£
URLºÍURIÀàËÆ¡£ÊÇ×ÊÔ´¶¨Î»µÄ¡£ ºÍURI²»Í¬µÄ¾ÍÊÇURLÌṩÁË»ñÈ¡¶«Î÷µÄ·½·¨¡£
        java.io.InputStream l_urlStream;
       // Ò²¿ÉÒÔ»»³Éuri,È»ºóµ÷ÓÃuri.toURL
        ......

´«ÖDz¥¿ÍJavaÅàѵ HTML»ù´¡Ê¾Àý

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>ʵÀý1</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME=" ......

½ÌÄãÔÚJavaÓ¦ÓóÌÐòÖж¯Ì¬µÄ·ÖÅäCPU×ÊÔ´

JavaµÄÏ̵߳÷¶È²Ù×÷ÔÚÔËÐÐʱÊÇÓëƽ̨Î޹صġ£Ò»¸ö¶àÈÎÎñϵͳÐèÒªÔÚÈÎÎñÖ®¼äʵÏÖQoS(Quality of Service)¹ÜÀíʱ£¬Èç¹ûCPU×ÊÔ´µÄ·ÖÅä»ùÓÚJavaÏ̵߳ÄÓÅÏȼ¶£¬ÄÇôËüÔÚ²»Í¬Æ½Ì¨ÉÏÔËÐÐʱµÄЧ¹ûÊǺÜÄÑÔ¤²âµÄ¡£±¾ÎÄÀûÓÃЭµ÷ʽ¶àÈÎÎñÄ£ÐÍ£¬Ìá³öÒ»¸öÓëƽ̨Î޹ء¢²¢ÇÒÄÜÔÚÈÎÎñ¼ä¶¯Ì¬·ÖÅäCPU×ÊÔ´µÄ·½°¸¡£
ÏÖÔÚ£¬ÓÉÓÚ¼ÆËã»úϵͳÒѾ­´ÓÈ ......

java equalsÓë== µÄÇø±ð

equals ·½·¨ÊÇ java.lang.Object ÀàµÄ·½·¨¡£
ÓÐÁ½ÖÖÓ÷¨ËµÃ÷£º
£¨1£©¶ÔÓÚ×Ö·û´®±äÁ¿À´Ëµ£¬Ê¹ÓÓ==”ºÍ“equals()”·½·¨±È½Ï×Ö·û´®Ê±£¬Æä±È½Ï·½·¨²»Í¬¡£
“==”±È½ÏÁ½¸ö±äÁ¿±¾ÉíµÄÖµ£¬¼´Á½¸ö¶ÔÏóÔÚÄÚ´æÖеÄÊ×µØÖ·¡£
“equals()”±È½Ï×Ö·û´®ÖÐËù°üº¬µÄÄÚÈÝÊÇ·ñÏàͬ¡£
±ÈÈ磺 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ