Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepowershell
linenumberstrue
set "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_51"
set "JRE_HOME=C:\Program Files\Java\jdk1.8.0_51\jre"
set "CATALINA_HOME=d:\smartbi\tomcat"
set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=GBK -Duser.region=CN -Duser.language=zh -Djava.awt.headless=true -Xms8192m -Xmx8192m -XX:MaxPermSizeMaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError"

...

Code Block
languagepowershell
linenumberstrue
export JAVA_HOME="/data/smartbi/jdk1.8.0_45"
export JRE_HOME="/data/smartbi/jdk1.8.0_45/jre"
export CATALINA_HOME="/opt/smartbi/tomcat"
export JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=GBK -Duser.region=CN -Duser.language=zh -Djava.awt.headless=true -Xms8192m -Xmx8192m -XX:MaxPermSizeMaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError"

...

在 HotSpot jdk 1.8 版本中,已经删除了 -XX:MaxPermSize 参数,可以使用 -XX:MetaspaceSize 代替它。MaxMetaspaceSize 代替它。

具体说明,请参考:Java8内存模型—永久代(PermGen)和元空间(Metaspace)

Code Block
languagepowershell
linenumberstrue
export JAVA_OPTS="$JAVA_OPTS -Xms8192m -Xmx8192m -XX:MetaspaceSizeMaxMetaspaceSize=512m"