增加Eclipse的JVM最大堆大小 [英] Increase JVM max heap size for Eclipse

查看:551
本文介绍了增加Eclipse的JVM最大堆大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图增加我的Eclipse的最大堆大小。我试过在 eclipse.ini 或通过命令行中指定,但不工作。



我的最大堆大小具有完全相同的限制(运行jconsole)和之后( System.out.println(java.lang.Runtime) getRuntime()。maxMemory()); )启动Eclipse。 1.8G


  1. 在启动JVM堆大小之前是否有任何方法修改(例如,配置文件?)

  2. 当指定堆大小为Eclipse时,我可能做错了什么?

这是命令:

  ./ eclipse / eclipse -debug -consoleLog -vmargs -Xms1000m -Xmx6000m -XX:-UseGCOverheadLimitcl 

这是我的 eclipse.ini (这些值被指定的eclipse启动参数覆盖):

  -startup 
plugins / org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins / org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package $。
- b --launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion = 1.6
-Dhelp.lucene.tokenizer = standard
-XX:MaxPermSize = 6000m
-Xms1000m
-Xmx6000m


解决方案

可以使用命令行选项增加Java虚拟机(JVM)分配的堆大小。

  -Xms< size>设置初始Java堆大小
-Xmx< size>设置最大Java堆大小
-Xss< size>设置java线程堆栈大小

如果使用tomcat服务器,可以通过进行更改堆大小到Eclipse /运行/运行配置并选择Apache Tomcat / your_server_name / Arguments,并在VM参数部分下使用以下内容:

  -XX :MaxPermSize = 256m 
-Xms256m -Xmx512M

如果您没有使用任何服务器,在运行代码之前,可以在命令行中键入以下内容:

  java -Xms64m -Xmx256m HelloWorld 

有关增加堆大小的更多信息,请参见 here


I am trying to increase the max heap size for my Eclipse. I have tried specifying in eclipse.ini or through the command line, but are not working.

My max heap size has the exact same limit before (running jconsole) and after (System.out.println(java.lang.Runtime.getRuntime().maxMemory());) starting Eclipse. 1.8G

  1. Is there any way to modify JVM heap size before it is launched (ex. a config file?)
  2. What could I be doing wrong when specifying heap size to Eclipse?

This is the command:

./eclipse/eclipse -debug -consoleLog -vmargs -Xms1000m -Xmx6000m -XX:-UseGCOverheadLimitcl

This is my eclipse.ini (which values are overwritten by the specified eclipse launching parameters):

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Dhelp.lucene.tokenizer=standard
-XX:MaxPermSize=6000m
-Xms1000m
-Xmx6000m

解决方案

It is possible to increase heap size allocated by the Java Virtual Machine (JVM) by using command line options.

-Xms<size>        set initial Java heap size
-Xmx<size>        set maximum Java heap size
-Xss<size>        set java thread stack size

If you are using the tomcat server, you can change the heap size by going to Eclipse/Run/Run Configuration and select Apache Tomcat/your_server_name/Arguments and under VM arguments section use the following:

-XX:MaxPermSize=256m
-Xms256m -Xmx512M

If you are not using any server, you can type the following on the command line before you run your code:

java -Xms64m -Xmx256m HelloWorld

More information on increasing the heap size can be found here

这篇关于增加Eclipse的JVM最大堆大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆