java.lang.OutOfMemoryError: Java heap space解决方法
引起java.lang.OutOfMemoryError: Java heap space异常,可能是由JAVA的堆栈设置太小的原因
根据网上的答案大致有以下两种解决方法:
1、在D:/apache-tomcat-6.0.18/bin/catalina.bat最前面加入:set JAVA_OPTS=-Xms384m -Xmx384m
注意:只有startup.bat启动tomcat,设置才能生效,如果利用windows的系统服务启动tomcat服务,上面的设置就不生效了,
就是说set JAVA_OPTS=-Xms384m -Xmx384m没起作用
2、在Eclilpse中修改启动参数,在VM arguments 加入-Xms384m -Xmx384m,
在myEclipse中依次打开:window-》preference-》myEclipse-》server-》tomcat 6-》jdk
输入-Xms384m -Xmx384m
好了!
不管你觉得有没有用,反正我是解决问题了。
相关文章
java单例模式的饿汉式、懒汉式与登记式案例代码详解java randomaccessfile读写操作文件案例代码java过滤器方式压缩js,css的静态文件gzip压缩用法解决java.lang.outofmemoryerror java heap spacejava生成图片验证码的代码tomcat启动报错:could not reserve enough space for object heapjava线程池使用方法mysql异常java.math.biginteger cannot be cast to java.lang.long解决dubbo错误java.lang.classnotfoundexception org.apache.log4j.loggerjava.math.roundingmode 参数详解spark异常java.lang.nosuchmethoderror scala.predef$.refarrayopsjava 位移运算 、 和 案例解析php intlchar check if code point is a space character according to javaphp splpriorityqueue compare priorities in order to place elements correctly in the heap while sifting upphp splpriorityqueue extracts a node from top of the heap and sift upJava 模板字符串 格式化 拼接的方式linux MAT排查解决java项目内存溢出 OutOfMemoryError: Java heap spaceJava判断操作系统是Linux还是WindowsJava正则表达式matcher.group()用法spark解决OutOfMemoryError: Not enough memory to build and broadcast the table to all worker nodes
关注编程学问公众号
