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

JavaÄÚ´æÒç³ö·ÖÀà

¹ØÓÚJavaÒç³ö·ÖÀ࣬ÎÒ¾­³£Åöµ½µÄÊÇÁ½ÀࣺһÀàÊÇjava.lang.OutOfMemoryError: Java heap space£¬Ò»ÀàÊÇjava.lang.OutOfMemoryError: PermGen space¡£
ÔÚÕâÁ½ÀàÖУ¬Ç°ÕßÅö¼ûµÄ´ÎÊý±È½ÏƵ·±¡£ÒòΪµ¼ÖÂJava heap spaceµÄÇé¿ö£¬ÓÐʱºò²¢²»ÊÇÄÚ´æ²»¹»£¬ËüÒ²»áÅ×´Ë´íÎóÐÅÏ¢¡£ÀýÈçÎÒ¾ÍÅöµ½¹ýÕâÑùµÄÇé¿ö£¬ÎÒµ±Ê±Í¨¹ýGCÈÕÖ¾·¢ÏÖ£¬Äڴ浱ǰռÓÃ40MB×óÓÒ£¨×î´ó·ÖÅä512MB£©£¬·Ç³£²»½â¡£×îºó¼ì²éÏÂÀ´·¢ÏÖÓÐÁ½ÖÖÇé¿ö»áµ¼ÖÂÕâÑùµÄÇé¿ö£º
Ò»ÖÖÊÇÏß³ÌÕ»²»¹»ÓÃÁË£¬Õë¶ÔSUNµÄJVMÊÇÉèÖÃXss²ÎÊý£¬Ò»°ã¶øÑÔÏß³ÌÕ»ÉèÖÃ256KÒѾ­ÊǺܶ࣬һ°ã²»»áÒýÆðÕâÑùµÄ´íÎ󣬳ý·ÇÄãÉèÖõÄ̫С£¬²Å»áµ¼Ö¡£
Ò»ÖÖÊÇÏ̵߳±Ç°´´½¨ÁËÒ»¸ö±È·ÖÅä¿Õ¼ä¸ü´óµÄ¶ÔÏ󣬴ó¼Ò¿ÉÄÜ»á¾õµÃ²»¿É˼Ò飬ÔÙÔõÑùÒ²²»»á´´½¨Ò»¸öÕâÑùµÄ¶ÔÏó¡£µ«ÊÇÔÚÓÐЩ³¡¾°Ï¾ͻá³öÏÖÕâÑùµÄ´íÎó£¬ÈçЭÒé½â°üʱ£¬Èç¹û½«Ò»¸öSTRINGÀàÐ͵Ä×ֶΣ¬°´INTÀàÐͽøÐнâ°üºó£¬ÓÃÕâ¸öÖµ×÷Ϊ´´½¨Ò»¸öһάÊý×éµÄ´óС£¬¾Í»áºÜÓпÉÄܳöÏÖÕâÑùµÄÇé¿ö¡£
µ±È»ÎÒËùÅöµ½µÄÇé¿ö£¬¶àÊýÊǺóÕßµ¼Ö¡£
µ±ÄÚ´æ²»¹»Ê±£¬×ÔÈ»¾ÍÅ׳öjava.lang.OutOfMemoryError: Java heap space£¬ÕâÖÖÇé¿ö×îÖÕ½«µ¼ÖÂJava³ÌÐòÍ£Ö¹¶ÔÍâ·þÎñ¡£µ¼ÖÂÕâÖÖÇé¿öÓкܶ࣬¿ÉÒԲο¼ÎÒÁíһƪÎÄÕ¡¶JavaÄÚ´æ¹ÜÀí¡·¡£
¹ØÓÚPermGen spaceµÄ½âÊ͵¹ÊǺܼòµ¥Ã÷ÁË£¬PermGen spaceÕâÒ»²¿·ÖÓÃÓÚ´æ·ÅClassºÍMetaµÄÐÅÏ¢,ClassÔÚ±» LoadµÄʱºò±»·ÅÈëPermGen spaceÇøÓò£¬ËüºÍºÍ´æ·ÅInstanceµÄHeapÇøÓò²»Í¬,GC(Garbage Collection)²»»áÔÚÖ÷³ÌÐòÔËÐÐÆÚ¶ÔPermGen space½øÐÐÇåÀí£¬ËùÒÔÈç¹ûÄãµÄAPP»áLOADºÜ¶àCLASSµÄ»°,¾ÍºÜ¿ÉÄܳöÏÖPermGen space´íÎó¡£
Ò»°ã½â¾ö·½Ê½¾ÍÊÇÉèÖÃJVMµÄPermSize²ÎÊýÖµ¼Ó´ó¡£²»¹ýµ¼ÖÂÕâÖÖÇé¿ö³öÏÖ£¬ÍøÉϸü¶àÊÇ˵ʹÓÃÁËcglibËùÖ¡£¸ÕºÃ×î½ü£¨·þÎñÆ÷ÓÅ»¯ºó£©£¬ÎҵķþÎñÆ÷Ò²Åöµ½Õâ¸öÎÊÌ⣬ËùÒÔÐèÒªÑéÖ¤ÑéÖ¤£¬È»ºóÔÙ¸æÖ®ÊÇ·ñÓÐЧ¡£


Ïà¹ØÎĵµ£º

JavaµÄһЩ»ã×Ü

1.//propertyÎļþµÄ¶ÁÈ¡
//com.test.messageÎļþ
package com.test;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Test_Messages {
private static final String BUNDLE_NAME = "com.test.messages";
private static final ResourceBundle RESOURCE_BUNDLE = Reso ......

JavaÖи²¸ÇÓëÖØÔصÄÇø±ð

     override¿ÉÒÔ·­ÒëΪ¸²¸Ç£¬´Ó×ÖÃæ¾Í¿ÉÒÔÖªµÀ£¬ËüÊǸ²¸ÇÁËÒ»¸ö·½·¨²¢ÇÒ¶ÔÆäÖØд£¬ÒÔÇó´ïµ½²»Í¬µÄ×÷Ó᣶ÔÎÒÃÇÀ´Ëµ×îÊìϤµÄ¸²¸Ç¾ÍÊǶԽӿڷ½·¨µÄʵÏÖ£¬ÔÚ½Ó¿ÚÖÐÒ»°ãÖ»ÊǶԷ½·¨½øÐÐÁËÉùÃ÷£¬¶øÎÒÃÇÔÚʵÏÖʱ£¬¾ÍÐèҪʵÏÖ½Ó¿ÚÉùÃ÷µÄËùÓз½·¨¡£³ýÁËÕâ¸öµäÐ͵ÄÓ÷¨ÒÔÍ⣬ÎÒÃÇÔڼ̳ÐÖÐÒ²¿ÉÄÜ»áÔÚ×ÓÀา¸Ç¸¸À ......

javaÄÚ´æ·Ö²¼


ÔÚJAVAÖУ¬ÓÐÁù¸ö²»Í¬µÄµØ·½¿ÉÒÔ´æ´¢Êý¾Ý£º
1. ¼Ä´æÆ÷£¨register£©¡£ÕâÊÇ×î¿ìµÄ´æ´¢Çø£¬ÒòΪËüλÓÚ²»Í¬ÓÚÆäËû´æ´¢ÇøµÄµØ·½——´¦ÀíÆ÷ÄÚ²¿¡£µ«ÊǼĴæÆ÷µÄÊýÁ¿¼«ÆäÓÐÏÞ£¬ËùÒԼĴæÆ÷ÓɱàÒëÆ÷¸ù¾ÝÐèÇó½øÐзÖÅä¡£Äã²»ÄÜÖ±½Ó¿ØÖÆ £¬Ò²²»ÄÜÔÚ³ÌÐòÖиоõµ½¼Ä´æÆ÷´æÔÚµÄÈκμ£Ïó¡£
2. ¶ÑÕ»£¨stack£©¡£Î»ÓÚͨÓÃRAMÖУ¬µ ......

½«javaÏîÄ¿Éú³Éexe¿ÉÖ´ÐÐÎļþÈ«¹ý³Ì

½«javaÏîÄ¿Éú³Éexe¿ÉÖ´ÐÐÎļþÈ«¹ý³Ì
2009Äê05ÔÂ10ÈÕ ÐÇÆÚÈÕ 16:30
Ò»¡¢Ê×ÏÈΪeclipse°²×°fatjar²å¼þ£¨Èç¹ûÄãµÄjarÏîÄ¿ÖÐÐèÒªÓõ½Í¼Æ¬¡¢Íⲿ³ÌÐòµÈÎļþʱҪÓô˲å¼þ´ò°ü³ÌÐò²ÅÄÜÕý³£ÔËÐУ©
°²×°·½Ê½ÓÐÁ½ÖÖ£º·½·¨1£ºÔÚÏß°²×°£¨ÍƼö£©
²½Ö裺
eclipse²Ëµ¥À¸ help >software updates >Find and install >Search f ......

JavaÖÐËÄÖÖXML½âÎö¼¼Êõ

DOMÊÇ»ùÓÚƽ̨¡¢ÓïÑÔÎ޹صĹٷ½W3C±ê×¼¡£»ùÓÚÊ÷µÄ²ã´Î£¬ÆäÓŵãÊÇ¿ÉÒÔÒÆÖ²£¬±à³ÌÈÝÒ×£¬¿ª·¢ÈËÔ±Ö»ÐèÒªµ÷Óý¨Ê÷µÄÖ¸Áî¡£ÆäȱµãÊǼÓÔØ´óÎļþ²»ÀíÏë¡£
¡¡¡¡SAXÊÇ»ùÓÚʼþÄ£Ð͵ģ¬ËüÔÚ½âÎö XML ÎĵµµÄʱºò¿ÉÒÔ´¥·¢Ò»ÏµÁеÄʼþ£¬µ±·¢ÏÖ¸ø¶¨µÄtagµÄʱºò£¬Ëü¿ÉÒÔ¼¤»îÒ»¸ö»Øµ÷·½·¨£¬¸æË߸÷½·¨Öƶ¨µÄ±êÇ©ÒѾ­ÕÒµ½¡£ÀàËÆÓëÁ÷ýÌåµÄ½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ