2

如何在 Windows 中为 jvm 添加 PermGen 空间?我找到了很多关于它的链接?但我不明白我必须在哪里单击并写入新值

4

2 回答 2

5

It is more of a Java runtime (JVM) setting than a Windows one. You configure it by adding the below parameters (example only) to your Java command line.

-XX:PermSize=256m 
-XX:MaxPermSize=512m

For example, if you were doing java -jar someapp.jar, you might have to do java -jar someapp.jar -XX:PermSize=256m -XX:MaxPermSize=512m.

A common practice is to define the -X parameters in an environment variable called JAVA_OPTS and using it in the command lines.

On unix,

export JAVA_OPTS="-XX:PermSize=256m -XX:MaxPermSize=512m"

java $JAVA_OPTS -jar someapp.jar

On Windows,

you can define a Local / System variable similarly.

java %JAVA_OPTS% -jar someapp.jar

于 2013-08-09T08:53:08.763 回答
0

You can increase size of PermGen Space by using JVM param -XX:MaxPermSize and -XX:PermSize.

enter image description here

于 2013-08-09T08:54:15.853 回答