在Eclipse打包的时候报错:gc overhead limit exceeded eclipse

原因是Eclipse默认配置内存太小须要更改安装Eclipse目录下的eclipse.ini文件。

Eclipse.ini默认文件例如以下:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-Xmx512m

改动例如以下:

-Xms512m
-Xmx1024m

第一个是最小的初始化内存,第二个是最大的占有内存

还能够加上 -XX:MaxPermSize=1024m这个意思是在编译文件时一直占有最大内存,更改上述參数重新启动Eclipse,ok

myeclipse中解决 java heap space 的方法

问题:在myeclipse中运行项目时控制台出现java.lang.OutOfMemoryError: Java heap space的错误

解决方法:

1、打开window-->Preferences-->Java-->Installed JREs

2、选择当前的JRE,然后点击edit按钮编辑该JRE

3、在Edit JRE窗口中设置Default VM Arguments为 -Xms512M -Xmx512M 即可(这个设置对所有的工程都有效)

myeclipse中解决 java heap space/gc overhead limit exceeded eclipse 的方法的更多相关文章

  1. java 异常 java.lang.OutOfMemoryError: GC overhead limit exceeded 解决

    一.异常如下: Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded ...

  2. java.lang.OutOfMemoryError GC overhead limit exceeded原因分析及解决方案

    最近一个上线运行良好的项目出现用户无法登录或者执行某个操作时,有卡顿现象.查看了日志,出现了大量的java.lang.OutOfMemoryError: GC overhead limit excee ...

  3. 并发测试 java.lang.OutOfMemoryError: GC overhead limit exceeded Xms Xmx 阻塞请求 单节点 请求分发 负载均衡

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:705) at javax.servlet.http.HttpServlet.se ...

  4. java.lang.OutOfMemoryError: GC overhead limit exceeded

    前端请求:{"code":400,"message":"Handler dispatch failed; nested exception is ja ...

  5. 排查java.lang.OutOfMemoryError: GC overhead limit exceeded

    帮助客户排查java.lang.OutOfMemoryError: GC overhead limit exceeded错误记录: 具体网址: https://support.oracle.com/e ...

  6. [SpringBoot/SpringMVC]从Webapp下载一个大文件出现java.lang.OutOfMemoryError: GC overhead limit exceeded怎么办?

    本文示例工程下载:https://files.cnblogs.com/files/xiandedanteng/WebFileDownload20191026.rar 制作一个Webapp,让其中一个网 ...

  7. android studio Error:java.lang.OutOfMemoryError: GC overhead limit exceeded

    android studio Error:java.lang.OutOfMemoryError: GC overhead limit exceeded 在app下的build.gradle中找到and ...

  8. 【jira】java.lang.OutOfMemoryError: GC overhead limit exceeded

    登录JIRA访问打开缓慢,查询日志出现下述提示:java.lang.OutOfMemoryError: GC overhead limit exceeded 修改setenv.sh文件中的JVM配置, ...

  9. java.lang.OutOfMemoryError: GC overhead limit exceeded异常处理

    今天写程序遇到个之前从没遇到的异常-----java.lang.OutOfMemoryError: GC overhead limit exceeded,下面附上解决方法 异常: 解决方法: 鼠标右击 ...

随机推荐

  1. C经典案例

    1. C中可变参数函数作为函数参数: void media_debug_set_handler(struct media_device *media, void (*debug_handler)(vo ...

  2. day26 python学习 对象的接口,封装,私用属性 property

    # 抽象类和接口类 #** #不崇尚接口类 #python本身支持多继承,没有接口专用的语法.但是我知道接口的概念 # 接口类:# 是规范子类的一个模板,只要接口类中定义的,就应该在子类中实现# 接口 ...

  3. GitLab 502问题的解决

    问题: 502 Whoops, GitLab is taking too much time to respond. 日志: [root@cs12-66-gitlab ~]# my gitlab-ct ...

  4. mySQL 教程 第3章 数据类型和数据完整性

    准备数据库 创建练习数据库,以下实验都是在这个数据库中完成. 练习1:比较各种数值型 create table tmp1 ( id INT, name VARCHAR(25), deptId deci ...

  5. angularJS自定义服务的几种方式

    在angularJS中定义服务共有四种常见的方式:factory,service,provider,constant,value 使用形式的不同: 1)factory以返回对象的形式定义服务: mya ...

  6. ML(4): 决策树分类

    决策树(Decision Tree)是用于分类和预测的主要技术,它着眼于从一组无规则的事例推理出决策树表示形式的分类规则,采用自顶向下的递归方式,在决策树的内部节点进行属性值的比较,并根据不同属性判断 ...

  7. 【python】网络编程-套接字常用函数

  8. Maven基本使用

    Maven基本使用 一.安装 先去官网下载maven(http://maven.apache.org/download.cgi) 下载下来解压后如下所示  配置环境变量   查看配置成功与否  mav ...

  9. 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights

    敏感词文件内容: 代码: def filtered_words(path='filtered_words.txt'): words = [] with open(path, 'r', encoding ...

  10. 杂项:IIS

    ylbtech-杂项:IIS IIS是Internet Information Services的缩写,意为互联网信息服务,是由微软公司提供的基于运行Microsoft Windows的互联网基本服务 ...