3

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)

2 Answers 2

6

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.
1
  • 2
    You don't have to (and should not) use _JAVA_OPTIONS, except as a prefix to running an individual command. As of 6.5.0, you can edit the sencha.vmoptions file in the Sencha Cmd install dir. Unfortunately, this can't be set on an app-by-app basis. Commented Oct 22, 2019 at 5:28
0

for new versions of sencha cmd (7.1+) see this image

you might need to increase Xms and Xmx more (please, don't exaggerate here)

For me, I have -Xms2048 -Xmx8192

close your bash/terminal and start it again over

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.