java Òì³£Exception ¼¯
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:ËÎÌå;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:NSimSun;
panose-1:2 1 6 9 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@NSimSun";
panose-1:2 1 6 9 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;}
h1
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:1;
font-size:24.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Se
Ïà¹ØÎĵµ£º
Ò».¶Ñ:ÓÃnew¹Ø¼ü×Ö½¨Á¢,´æ·Å¶ÔÏóµÄÄÚÈÝ,GC¸ºÔð×Ô¶¯»ØÊÕ
ÄãÓÃÊ®¼¸¸öÂ齫ÅÆÊúÖ±µþ³ÉÒ»ÞûÕâ½Ð¶Ñ£¬Äã¿ÉÒÔ´ÓÉÏÃæ¡¢ÏÂÃæ¡¢ÖмäÈÎÒâ³é³öÒ»ÕÅÅÆ£¬Ò²¿ÉÒÔÈÎÒâ²åÈëÒ»ÕÅ¡£ËùÒԶѺÜÁé»î£¬µ«²»°²È«¡£¶ÔÓÚ¶ÔÏó£¬ÎÒÃÇÒª¶¯Ì¬µØ´´½¨¡¢Ïú»Ù£¬²»ÄÜ˵ºó´´½¨µÄ¶ÔÏóûÓÐÏú»Ù£¬ÏÈÇ°´´½¨µÄ¶ÔÏó¾Í²»ÄÜÏú»Ù£¬ÄÇÑùµÄ»°ÎÒÃǵijÌÐò¾Í´ç²½ÄÑÐУ¬ËùÒÔJavaÖ ......
ʹÓÃJava³ÌÐò´ÓÊý¾Ý¿âÖвéѯ´óÁ¿µÄÊý¾ÝʱÈÝÒ׳öÏÖÒì³£:
java.lang.OutOfMemoryError: Java heap space
ÔÚJVMÖÐÈç¹û98£¥µÄʱ¼äÊÇÓÃÓÚGCÇÒ¿ÉÓÃµÄ Heap size ²»×ã2£¥µÄʱºò½«Å׳ö´ËÒì³£ÐÅÏ¢¡£
»¹ÓÐʹÓÃjxl¶ÁдexcelÎļþʱ£¬Í¬Ê±¶ÁÈëËùÓмǼ£¬Ò²ÈÝÒ׳öÏÖÕâ¸öÎÊÌâ¡£
JVM¶ÑµÄÉèÖÃÊÇÖ¸java³ÌÐòÔËÐйý³ÌÖÐJVM¿ÉÒÔµ÷ÅäʹÓõÄÄÚ ......
Java¿ª·¢ÖУ¬×îÖյijÌÐò·¢²¼Ò»°ãÊÇÒª´ò³Éjar°üÐÎʽµÄ£¬¶øÓÐһЩÅäÖÃÎļþÊÇ·ÅÔÚjarÀïÃæµÄ£¬ÕâÑùÔÚ×öFileÐÎʽµÄ¶Áȡʱ£¬¾Í»á·¢ÏÖ¶Á²»µ½ÏàÓ¦µÄÎļþ¡£ÏÂÃæÌṩһÖÖ½â¾ö·½Ê½£ºString fileName = "/config/abcd.config";
InputStream in = getClass().getResourceAsStream(fileName);
BufferedReader br = null;
try{
br = n ......
µÚÒ»²½£º²é¿´Linux×Ô´øµÄJDKÊÇ·ñÒÑ°²×° £¨Ð¶ÔØcentOSÒÑ°²×°µÄ1.4£©
<1># rpm -qa|grep jdk ← ²é¿´jdkµÄÐÅÏ¢»òÖ±½ÓÖ´ÐÐ
»ò
# rpm -q jdk
»ò
# java -version
<2># rpm -qa | grep gcj ← È·ÈÏgcjµÄ°æ±¾ºÅ
<3># yum -y remove java-1.4.2-gcj-compat ← жÔØgcj
µÚ¶þ²½£º°²×°JDK
< ......
Á½¸ötomcat Java¶¨Ê±ÈÎÎñµÄÀý×Ó
ÀýÒ»£º
±¾ÀýÒÀ¾ÝJava×ÔÉíÌṩµÄ½Ó¿ÚʵÏÖ£¬Í¨¹ý¼àÌýÆ÷£¨Listener£©ºÍ¶¨Ê±Æ÷£¨Timer£©¶¨Ê±Ö´ÐÐij¸öÈÎÎñ£¨Task£©¡£
רҵµÄ¿ªÔ´¹¤¾ß¿É²Î¿¼Quartz£ºhttp://www.opensymphony.com/quartz/
MyListener£º
import
java.util.Timer;
import
javax.servlet.ServletContextEvent;
i ......