很遺憾,我無法reproduce當時的錯誤,只好簡單描述一下了,sigh....
在批處理文件裡設置jvm的初始內存最大/最小值。
1)首先,判斷系統可以設置的最大內存值
Start > Run > input 'cmd' in [Run] dialog and click on 'OK'.
In command window, input the following command
java -Xmx2046m -version
set JAVA_OPTS=-server -Xms768m -Xmx768m -XX:PermSize=128M -XX:MaxNewSize=256m -XX:MaxPermSize=256m
<mxmlc file="${flex.src}/@{name}.mxml" output="${flex.bin}/@{name}.swf" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" optimize="true" fork="true" classpathref="flex.lib.classpath">
<jvmarg line="-Xms512m -Xmx700m -XX:MaxPermSize=700m -XX:PermSize=512m" />
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<source-path path-element="${FLEX_HOME}/frameworks" />
注意這裡提示說明2046m超出了系統的限制。將最大內存值減小至1640m時,查看執行結果,說明系統的最大限制為1640M.
<wbr></wbr>
2)在批處理文件裡設置JAVA_OPTS=-Xms516m -Xmx1024m後,執行時提示如下錯誤:
Invalid initial heap size: -Xms512m -Xmx1024m
Could not create Java Virtual Machine
根據bug_34029<wbr>嘗試<strong><span style="color:#546D8E; word-wrap:normal; word-break:normal; line-height:21px">將最大與最小內存值分別設置在兩個變量裡</span></strong>,即,</wbr>
set JAVA_OPTS_MAX=-Xmx1024m
set JAVA_OPTS_MIN=-Xms512m
便成功了。(在reproduce時,發現即使定義在同一變量裡似乎也是沒有問題的,原因未查)
|
| |||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||
Description
Rajadurai
2005-03-16 08:08:48 UTC
Comment 1
Jan Mat
2005-03-16 08:12:15 UTC
|