search

Home  >  Q&A  >  body text

java - JVM启动参数-Xmx的默认值是多少?

黄舟黄舟2786 days ago1006

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-04-18 10:15:06

    Oracle’s official documentation was not found. Please try the explanation in the SO answer.
    http://stackoverflow.com/ques...

    reply
    0
  • 阿神

    阿神2017-04-18 10:15:06

    To answer your actual question: Only run server 模式下的时候才是 min(1G, 物理内存的四分之一) 所以依你的情况应该是 1G 的样子 当然别忘了要用 java -server <类名> to start your program ..

    You can also try printing the value of Runtime.getRuntime().maxMemory() in the program to see what it is

    reply
    0
  • Cancelreply