How to increase Java Heap Memory for CMD 6.1.1.76

爷,独闯天下 提交于 2019-12-12 16:41:30

问题


How to increase Java Heap Memory for CMD 6.1.1.76 ?

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

I'm getting a Java heap exception when running

sencha app build

specifically while slicing images (I don't want to skip this)


回答1:


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

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

You can find more info about configuration files in the Sencha Cmd Docs.

EDIT: 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.


来源:https://stackoverflow.com/questions/36682753/how-to-increase-java-heap-memory-for-cmd-6-1-1-76

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!