问题描述
当我启动IntelliJ或在项目。
I get this warning when I launch IntelliJ or run play
in a Play project.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
如何让它消失?
关于Java的变化,但是在使用Scala时,我没有看到任何关于如何使这个警告消失的提示。
I see lots of explanations about what the change to Java is, but I don't see any tips for how to make this warning go away when working with Scala.
OS X 10.9.4。 Scala 2.11.1。 sbt 0.13.5
OS X 10.9.4. Scala 2.11.1. sbt 0.13.5
编辑
基本上我要问的是我系统上的所有地方 MaxPermSize
可能会在哪里设置?
Basically what I'm asking is "Where are all the places on my system MaxPermSize
might get set?"
我的机器上没有设置 sbt-launch-lib.bash
。
I确实找到了 MaxPermSize
IntelliJ的Scala-> JVM Parameters选项。删除它会使IntelliJ中的警告消失。
I did find MaxPermSize
Scala->JVM Parameters option of IntelliJ. Removing that makes the warning go away in IntelliJ.
编辑
更改了问题。我最初说这发生在SBT。 (下面的一些评论解决了这个问题。)这是我的错误。只有当我从命令行运行 play
时才会运行SBT。
Changed question. I originally said that this happened for SBT. (Some of the comments below address this.) This was an error on my part. It doesn't happen when I run SBT, only when I run play
from the command line.
是不是Play的一个已知错误是指定 MaxPermSize
参数?有没有办法让它停止?
Is it a known bug for Play to specify the MaxPermSize
parameter? Is there a way to make it stop?
编辑
我不认为这是jdk中。该线程描述了警告出现的原因,但未解释如何更改IntelliJ或Play配置以使其不再显示。
I don't think this is a duplicate of PermGen elimination in jdk 8. That thread describes why the warning appears but does not explain how to change the IntelliJ or Play configurations to make it no longer appear.
推荐答案
这警告你仍然假设你传入的这个标志会起作用但是这个标志已经从1.8开始移除了,jvm 1.8以后没有烫发空间
This warns that you are still assuming that this flag you are passing in would work but this flag has been removed from 1.8 onward, there is no perm space in jvm 1.8 onwards
所以要摆脱这个警告从所有从sbt传递给jvm的地方删除 -XX:MaxPermSize
so to get rid of this warning remove -XX:MaxPermSize
from all the places which passes it to jvm from sbt
例如,在Windows上,您只需编辑文件 C:\Program Files(x86)\sbt\conf\sbtconfig.txt
并编辑为更改它以评论 XX:MaxPermSize = 256M
。例如:
For example, on Windows you just need to edit the file C:\Program Files (x86)\sbt\conf\sbtconfig.txt
and edit to change it to comment the XX:MaxPermSize=256M
. For example:
-Xmx512M
#Commented parameter as it is deprecated on jvm 1.8 onwards
#-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=128m
# Set the extra SBT options
-Dsbt.log.format=true
这篇关于如何制作“Java Hot Spot MaxPermSize”使用IntelliJ或Play时警告会消失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!