如何为 CMD 6.1.1.76 增加 Java 堆内存

Ryu*_*yuk 2 extjs sencha-cmd

如何为 CMD 6.1.1.76 增加 Java 堆内存?

我认为这些不再有效的方法:

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 堆异常

煎茶应用程序构建

特别是在切片图像时(我不想跳过这个)

pag*_*gep 5

您必须编辑位于 Cmd 文件夹中的sencha.cfg文件。如果您使用的是 Windows - 很可能在这里:

C:\Users\<user>\bin\Sencha\Cmd\6.1.1.76
Run Code Online (Sandbox Code Playgroud)

在其中,您将找到带有 JVM 启动参数的部分:

#------------------------------------------------------------------------------
# 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
Run Code Online (Sandbox Code Playgroud)

您可以在Sencha Cmd Docs 中找到有关配置文件的更多信息。

编辑:从 Cmd 6.5.0 这不再有效。你将不得不使用 _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.
Run Code Online (Sandbox Code Playgroud)

  • 您不必(也不应该)使用 _JAVA_OPTIONS,除非作为运行单个命令的前缀。从 6.5.0 开始,您可以编辑 Sencha Cmd 安装目录中的 `sencha.vmoptions` 文件。不幸的是,这不能逐个应用程序进行设置。 (2认同)