如何为CMD 6.1.1.76增加Java堆内存 [英] How to increase Java Heap Memory for CMD 6.1.1.76
问题描述
如何为CMD 6.1.1.76增加Java堆内存?
我认为这些不再是有效的方法:
I think these are no longer valid methods:
http://www.ladysign-apps.com/developer/java-heap-exception-when-using-sencha-cmd/#.VxQIauMrJTY
https://www.sencha.com/forum/showthread.php?251529-Java-Heap-Size
我在运行时遇到Java堆异常
sencha应用程序构建
sencha app build
特别是在切片图像时(我不想跳过它)
推荐答案
您必须编辑位于Cmd文件夹中的 sencha.cfg 文件. 如果您使用的是Windows,则很可能在这里:
You have to edit sencha.cfg file which is located in your Cmd folder. If you are on Windows - most probably here:
C:\Users\<user>\bin\Sencha\Cmd\6.1.1.76
在其中,您将找到带有JVM启动参数的部分:
In it, you will find the part with JVM startup arguments:
#------------------------------------------------------------------------------
# These are the JVM startup arguments. The primary things to tweak are the JVM
# heap sizes.
# java.awt.headless=true - required to make phantomjs (used by theme slicer)
# work in headless environments
# cmd.jvm.args=-Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n -Xms128m -Xmx2048m -Djava.awt.headless=true
cmd.jvm.args=-Xms128m -Xmx1024m -Dapple.awt.UIElement=true
您可以在 Sencha中找到有关配置文件的更多信息. Cmd文档.
编辑:从Cmd 6.5.0起,此功能不再起作用.您将不得不使用_JAVA_OPTIONS
From Cmd 6.5.0 this no longer works. You will have to use _JAVA_OPTIONS
# On previous versions, this file provided a way to specify the cmd.jvm.* properties
# to control the execution of the JVM. To accommodate all possible execution scenarios
# support for these properties has been removed in favor of using the _JAVA_OPTIONS
# environment variable.
这篇关于如何为CMD 6.1.1.76增加Java堆内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!