Java heep space£¨JavaÄÚ´æÒç³öÎÊÌ⣩
½ñÌìÓöµ½ÁËÕâ¸öÎÊÌâ ÁËºÇºÇ ½â¾öÁ˸ø´ó¼Ò·ÖÏíÏÈ£¬java.lang.OutOfMemoryError: Java heap space ÒýÆðÁËÎÒÉÏ´«³ö´í¡£ÎÒ½â¾ö°ì·¨¾ÍÊÇ¿´ÄãʹÓõÄtomcat·þÎñÆ÷°æ±¾ÊÇʲôÑùµÄ£¬Èç¹ûÄãµÄtomcat/binϱßÓÐtomcatw.exe ¾Í·½±ãÁË£¬Ö±½Ó¿ÉÊÓ»¯²Ù×÷ŶÏÂÏÂͼ
ÆäÖÐÉèÖóõʼÄÚ´æ³ØºÍ×î´óÄÚ´æ³Ø£¬ÉèÖÃÔÔòÊǸù¾ÝÄãµÄÎïÀíÄÚ´æÀ´¶¨¡£
Èç¹ûÊÇtomcatµÄÆäËû°æ±¾Ã»ÓÐÕâ¸öÆô¶¯´°¿ÚµÄ»°¾ÍÒªÕÒµ½tomcatϱßcatalina.baÔÚÀï±ßÌí¼ÓÕâôһ¾ä¾ÍOKÁË
set JAVA_OPTS= -Xmx1024M -Xms512M -XX:MaxPermSize=256m
ºÃÁËÎÊÌâ½â¾ö°ì·¨¾ÍÕ⣬ÍêÁË¡£
Ïà¹ØÎĵµ£º
Eryptogram.java Îļþ£º
package com.cube.limail.util;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
/**
* ¼ÓÃܽâÃÜÀà
* @author Ò¶Ê÷Éî
* @version 1.00 2008Äê01ÔÂ03ÈÕ
*/
public class Eryptogram
{
&nb ......
/**
* µÃµ½±¾ÖÜÖÜÒ»
*
* @return yyyy-MM-dd
*/
public static String getMondayOfThisWeek() {
Calendar c = Calendar.getInstance();
int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
if (day_of_week == 0)
da ......
´ó¼Ò¶¼ËµjavaʹÓõÄ×Ö·û¼¯ÊÇunicode£¬ÄÇôĬÈϱàÂë²»¾ÍÊÇÓ¦¸ÃÊÇUTF8,UTF16Ö®ÀàµÄunicode±àÂëÂð£¿
¿ÉÊǵ÷ÓÃCharset.defaultCharset()µÄ½á¹û²¢·ÇÈç´Ë¡£
import java.nio.charset.Charset;
public class javaCode {
public static void main(String args[])
{
String defaultCharsetName=Charset.defaultChars ......
ÔںܶàJavaÓ¦ÓÃÖÐÐèÒªÔÚ³ÌÐòÖе÷ÓÃJava±àÒëÆ÷À´±àÒëºÍÔËÐС£µ«ÔÚÔçÆڵİ汾ÖУ¨Java SE5¼°ÒÔÇ°°æ±¾£©ÖÐÖ»ÄÜͨ¹ýtools.jarÖеÄcom.sun.tools.javac°üÀ´µ÷ÓÃJava±àÒëÆ÷£¬µ«ÓÉÓÚtools.jar²»ÊDZê×¼µÄJava¿â£¬ÔÚʹÓÃʱ±ØÐëÒªÉèÖÃÕâ¸öjarµÄ·¾¶¡£¶øÔÚJava SE6ÖÐΪÎÒÃÇÌṩÁ˱ê×¼µÄ°üÀ´²Ù×÷Java±àÒëÆ÷£¬Õâ¾ÍÊÇjavax.tools°ü¡£Ê¹ÓÃÕ ......