eclipse 设置java虚拟机内存大小
100W数据,堆内存不够用
生成关联规则需要数据的开始时间,2011-02-17 09:16:48
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
?at java.lang.reflect.Method.copy(Method.java:143)
?at java.lang.reflect.ReflectAccess.copyMethod(ReflectAccess.java:118)
?at sun.reflect.ReflectionFactory.copyMethod(ReflectionFactory.java:282)
?at java.lang.Class.copyMethods(Class.java:2748)
?at java.lang.Class.getDeclaredMethods(Class.java:1791)
?at java.beans.Introspector$1.run(Introspector.java:1272)
?at java.security.AccessController.doPrivileged(Native Method)
?at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1270)
?at java.beans.Introspector.internalFindMethod(Introspector.java:1306)
?at java.beans.Introspector.findMethod(Introspector.java:1377)
?at java.beans.PropertyDescriptor.getWriteMethod(PropertyDescriptor.java:246)
?at org.apache.commons.dbutils.BeanProcessor.callSetter(BeanProcessor.java:227)
?at org.apache.commons.dbutils.BeanProcessor.createBean(BeanProcessor.java:210)
?at org.apache.commons.dbutils.BeanProcessor.toBean(BeanProcessor.java:125)
?at org.apache.commons.dbutils.BasicRowProcessor.toBean(BasicRowProcessor.java:111)
?at org.apache.commons.dbutils.handlers.BeanListHandler.handleRow(BeanListHandler.java:77)
?at org.apache.commons.dbutils.handlers.GenericListHandler.handle(GenericListHandler.java:43)
?at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:237)
?at com.xxt.dbutils.QueryUtil.query(QueryUtil.java:276)
?at com.xxt.dbutils.QueryUtil.query(QueryUtil.java:254)
?at cn.xxt.clickstream.dao.XxtWebLogDAO.getAllClickInfo(XxtWebLogDAO.java:37)
?at cn.xxt.clickstream.service.AssociationRuleData.getAllClickInfo(AssociationRuleData.java:167)
?at cn.xxt.clickstream.service.AssociationRuleData.main(AssociationRuleData.java:45)
打开eclipse,选择Window--Preferences...在对话框左边的树上双击Java,再双击Installed JREs,在右边选择前面有对勾的JRE,再单击右边的“Edit”按钮,
出现一个 Edit JRE 的对话框,在其中的Default VM Arguments: 框中输入 -Xms128m -Xmx512m ,这样设置Java拟虚机内存使用最小是128M,最大是512M,再单击“OK”关闭 Edit JRE 对话框,再单击“OK”关闭 Preferences对话框,Eclipse一下子就运行快了起来