1. <legend id='j3EvU'><style id='j3EvU'><dir id='j3EvU'><q id='j3EvU'></q></dir></style></legend><tfoot id='j3EvU'></tfoot>
        <bdo id='j3EvU'></bdo><ul id='j3EvU'></ul>

        <small id='j3EvU'></small><noframes id='j3EvU'>

        <i id='j3EvU'><tr id='j3EvU'><dt id='j3EvU'><q id='j3EvU'><span id='j3EvU'><b id='j3EvU'><form id='j3EvU'><ins id='j3EvU'></ins><ul id='j3EvU'></ul><sub id='j3EvU'></sub></form><legend id='j3EvU'></legend><bdo id='j3EvU'><pre id='j3EvU'><center id='j3EvU'></center></pre></bdo></b><th id='j3EvU'></th></span></q></dt></tr></i><div id='j3EvU'><tfoot id='j3EvU'></tfoot><dl id='j3EvU'><fieldset id='j3EvU'></fieldset></dl></div>

        以编程方式设置最大 Java 堆大小

        programmatically setting max java heap size(以编程方式设置最大 Java 堆大小)
          <bdo id='Tc5he'></bdo><ul id='Tc5he'></ul>

            <tbody id='Tc5he'></tbody>

          <small id='Tc5he'></small><noframes id='Tc5he'>

            <legend id='Tc5he'><style id='Tc5he'><dir id='Tc5he'><q id='Tc5he'></q></dir></style></legend>
          • <tfoot id='Tc5he'></tfoot>
                  <i id='Tc5he'><tr id='Tc5he'><dt id='Tc5he'><q id='Tc5he'><span id='Tc5he'><b id='Tc5he'><form id='Tc5he'><ins id='Tc5he'></ins><ul id='Tc5he'></ul><sub id='Tc5he'></sub></form><legend id='Tc5he'></legend><bdo id='Tc5he'><pre id='Tc5he'><center id='Tc5he'></center></pre></bdo></b><th id='Tc5he'></th></span></q></dt></tr></i><div id='Tc5he'><tfoot id='Tc5he'></tfoot><dl id='Tc5he'><fieldset id='Tc5he'></fieldset></dl></div>
                  本文介绍了以编程方式设置最大 Java 堆大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有没有办法以编程方式设置最大 java 堆大小而不是作为 vm 参数?

                  Is there a way to set the max java heap size programmatically instead of as a vm argument?

                  类似:

                  System.getProperties().put("<heap variable>", "1000m");
                  

                  推荐答案

                  不适用于任何 Hotspot JVM.JVM 堆参数只能在命令行中指定,然后在 JVM 的生命周期内固定.

                  Not with any Hotspot JVM. The JVM heap parameters can only be specified on the command line, and are then fixed for the lifetime of the JVM.

                  使用 Hotspot Java 实现,更改"应用程序的堆大小的唯一方法是在具有不同命令行参数的新 JVM 中重新启动它.

                  With Hotspot Java implementations, the only way to "change" the heap size of an application is to relaunch it in a new JVM with different command line parameters.

                  (我隐约记得其他一些供应商的 JVM确实允许在运行的 JVM 中更改一些堆参数.也许有人可以澄清一下.)

                  (I vaguely recall that JVMs from some other vendors do allow some heap parameters to be changed in a running JVM. Perhaps someone can clarify.)

                  这篇关于以编程方式设置最大 Java 堆大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bytecode features not available in the Java language(Java 语言中不可用的字节码功能)
                  ClassCastException because of classloaders?(ClassCastException 因为类加载器?)
                  How can I add a Javaagent to a JVM without stopping the JVM?(如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?)
                  Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )(无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件))
                  Encourage the JVM to GC rather than grow the heap?(鼓励 JVM 进行 GC 而不是增加堆?)
                  Why a sawtooth shaped graph?(为什么是锯齿形图形?)

                    <tbody id='hkE0l'></tbody>

                    <bdo id='hkE0l'></bdo><ul id='hkE0l'></ul>

                      <tfoot id='hkE0l'></tfoot>
                      <i id='hkE0l'><tr id='hkE0l'><dt id='hkE0l'><q id='hkE0l'><span id='hkE0l'><b id='hkE0l'><form id='hkE0l'><ins id='hkE0l'></ins><ul id='hkE0l'></ul><sub id='hkE0l'></sub></form><legend id='hkE0l'></legend><bdo id='hkE0l'><pre id='hkE0l'><center id='hkE0l'></center></pre></bdo></b><th id='hkE0l'></th></span></q></dt></tr></i><div id='hkE0l'><tfoot id='hkE0l'></tfoot><dl id='hkE0l'><fieldset id='hkE0l'></fieldset></dl></div>

                        <small id='hkE0l'></small><noframes id='hkE0l'>

                        <legend id='hkE0l'><style id='hkE0l'><dir id='hkE0l'><q id='hkE0l'></q></dir></style></legend>