I'm using IDEA 12 Leda on Mountain Lion. I wanted to increase the maximum memory that IDE can use. I set the VMOptions in Info.plist file to be -Xmx2048m -ea -XX:+HeapDumpOnOutOfMemoryError -Xverify:none -Xbootclasspath/a:../lib/boot.jar
我在用概念12里达来描述美洲狮。我想增加IDE可以使用的最大内存。我在Info中设置了VMOptions。plist文件为-Xmx2048m -ea:+HeapDumpOnOutOfMemoryError -Xverify:none -Xbootclasspath/a:.. ./lib/boot.jar
When I open up IDEA, I still see the maximum memory to be 711m.
当我打开想法时,我仍然看到最大内存是711米。
jps -v
shows my VMOptions has been loaded but it's replaced by the following options.
jps -v显示我的VMOptions已经加载,但是它被以下选项所取代。
29388 **-Xmx2048m** -ea -XX:+HeapDumpOnOutOfMemoryError -Xverify:none -Xbootclasspath/a:../lib/boot.jar -Xms128m **-Xmx800m** -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=64m -XX:+UseCodeCacheFlushing -XX:+UseCompressedOops -Didea.paths.selector=IdeaIC12 -Dsun.java2d.noddraw=true -Didea.max.intellisense.filesize=2500 -Didea.dynamic.classpath=false -Didea.jars.nocopy=false -Dsun.java2d.d3d=false -Dapple.awt.fullscreencapturealldisplays=false -Dapple.laf.useScreenMenuBar=true -Djava.endorsed.dirs= -Dswing.bufferPerWindow=false -Didea.fatal.error.notification=enabled -Didea.cycle.buffer.size=1024 -Didea.popup.weight=heavy -Didea.xdebug.key=-Xdebug -Dapple.awt.graphics.UseQuartz=true -Dsun.java2d.pmoffscreen=false -Didea.no.launcher=false -DCVS_PASSFILE=~/.cvspass -Didea.use.default.antialiasing.in.editor=false -Dcom.apple.mrj.application.live-resize=false -Didea.smooth.progress=false
29392 Jps -Dapplication.home=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home -Xms8m
Where does -Xmx800
come from? I need to remove it.
-Xmx800从哪里来?我需要移除它。
9 个解决方案
#1
511
Since IDEA 15.0.4 you can use Help
| Edit Custom VM Options...
:
自从想法15.0.4,你可以使用帮助|编辑自定义VM选项…:
This will automatically create a copy of the .vmoptions
file in the config folder and open a dialog to edit it.
这将自动在config文件夹中创建.vmoptions文件的副本,并打开一个对话框对其进行编辑。
IntelliJ IDEA 12 is a signed application, therefore changing options in Info.plist
is no longer recommended, as the signature will not match and you will get issues depending on your system security settings (app will either not run, or firewall will complain on every start, or the app will not be able to use the system keystore to save passwords).
IntelliJ IDEA 12是一个签名的应用程序,因此改变了Info中的选项。plist不再被推荐,因为签名将不匹配,您将根据您的系统安全设置出现问题(应用程序将不会运行,或者防火墙将在每次启动时进行投诉,或者应用程序将无法使用系统密钥库保存密码)。
As a result of addressing IDEA-94050 a new way to supply JVM options was introduced in IDEA 12:
在解决IDEA-94050之后,在IDEA 12中引入了一种提供JVM选项的新方法:
Now it can take VM options from
~/Library/Preferences/<appFolder>/idea.vmoptions
and system properties from~/Library/Preferences/<appFolder>/idea.properties
.现在它可以从~/Library/Preferences/
/idea中获取VM选项。vmoptions和系统属性来自~/Library/Preferences/ /idea.properties。
For example, to use -Xmx2048m option you should copy the original .vmoptions
file from /Applications/IntelliJ IDEA.app/bin/idea.vmoptions
to ~/Library/Preferences/IntelliJIdea12/idea.vmoptions
, then modify the -Xmx
setting.
例如,要使用-Xmx2048m选项,您应该从/Applications/IntelliJ idea. app/bin/idea复制原始的.vmoptions文件。vmoptions ~ /图书馆/偏好/ IntelliJIdea12 /想法。然后修改-Xmx设置。
The final file should look like:
最后的文件应如下:
-Xms128m
-Xmx2048m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
Copying the original file is important, as options are not added, they are replaced.
复制原始文件很重要,因为选项不被添加,而是被替换。
This way your custom options will be preserved between updates and application files will remain unmodified making signature checker happy.
这样,您的自定义选项将保留在更新之间,而应用程序文件将保持不变,使签名检查程序满意。
Community Edition: ~/Library/Preferences/IdeaIC12/idea.vmoptions
file is used instead.
Community Edition:~ /图书馆/偏好/ IdeaIC12 /想法。而使用vmoptions文件。
#2
#3
14
For IDEA 13 and OS X 10.9 Mavericks, the correct paths are:
对于想法13和OS X 10.9的小牛,正确的路径是:
Original: /Applications/IntelliJ IDEA 13.app/Contents/bin/idea.vmoptions
原:/应用程序/ IntelliJ IDEA 13.应用/内容/ bin / idea.vmoptions
Copy to: ~/Library/Preferences/IntelliJIdea13/idea.vmoptions
复制:~ /图书馆/ / IntelliJIdea13 / idea.vmoptions偏好
#4
11
Here is a link to the latest documentation as of today http://www.jetbrains.com/idea/webhelp/increasing-memory-heap.html
下面是今天最新的文档的链接http://www.jetbrains.com/idea/webhelp/growing -memory-heap.html
#5
4
go to that path "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\bin\idea.exe.vmoptions" and change size to -Xmx512m
转到“C:\程序文件(x86)\ IntelliJ IDEA 12.1.4\bin\ IDEA .exe”路径。并将大小更改为-Xmx512m
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
hope its will work
希望它能工作
#6
3
OSX 10.9, if you dont bother about signed application you might just change
osx10.9,如果您不关心签名应用程序,您可能只需要更改
/Applications/IntelliJ\ IDEA\ 12\ CE.app/bin/idea.vmoptions
#7
2
It looks like IDEA solves this for you (like everything else). When loading a large project and letting it thrash, it will open a dialog to up the memory settings. Entering 2048 for Xmx and clicking "Shutdown", then restarting IDEA makes IDEA start up with more memory. This seems to work well for Mac OS, though it never seems to persist for me on Windows (not sure about IDEA 12).
看起来创意为你解决了这个问题(就像其他事情一样)。当加载一个大型项目并让它通过时,它将打开一个对话框,以提高内存设置。为Xmx输入2048并单击“关机”,然后重新启动IDEA将使IDEA拥有更多的内存。这似乎对Mac OS很有效,尽管它在Windows上似乎永远都不存在(对想法12不确定)。
#8
1
On my machine this only works in bin/idea.vmoptions
, adding the setting in ~/Library/Preferences/IntelliJIdea12/idea.vmoptions
causes the IDEA to hang during startup.
在我的机器上,这个只能在bin/idea中工作。vmoptions,在~/Library/Preferences/IntelliJIdea12/idea中添加设置。vmoptions导致在启动时挂起这个想法。
#9
#1
511
Since IDEA 15.0.4 you can use Help
| Edit Custom VM Options...
:
自从想法15.0.4,你可以使用帮助|编辑自定义VM选项…:
This will automatically create a copy of the .vmoptions
file in the config folder and open a dialog to edit it.
这将自动在config文件夹中创建.vmoptions文件的副本,并打开一个对话框对其进行编辑。
IntelliJ IDEA 12 is a signed application, therefore changing options in Info.plist
is no longer recommended, as the signature will not match and you will get issues depending on your system security settings (app will either not run, or firewall will complain on every start, or the app will not be able to use the system keystore to save passwords).
IntelliJ IDEA 12是一个签名的应用程序,因此改变了Info中的选项。plist不再被推荐,因为签名将不匹配,您将根据您的系统安全设置出现问题(应用程序将不会运行,或者防火墙将在每次启动时进行投诉,或者应用程序将无法使用系统密钥库保存密码)。
As a result of addressing IDEA-94050 a new way to supply JVM options was introduced in IDEA 12:
在解决IDEA-94050之后,在IDEA 12中引入了一种提供JVM选项的新方法:
Now it can take VM options from
~/Library/Preferences/<appFolder>/idea.vmoptions
and system properties from~/Library/Preferences/<appFolder>/idea.properties
.现在它可以从~/Library/Preferences/
/idea中获取VM选项。vmoptions和系统属性来自~/Library/Preferences/ /idea.properties。
For example, to use -Xmx2048m option you should copy the original .vmoptions
file from /Applications/IntelliJ IDEA.app/bin/idea.vmoptions
to ~/Library/Preferences/IntelliJIdea12/idea.vmoptions
, then modify the -Xmx
setting.
例如,要使用-Xmx2048m选项,您应该从/Applications/IntelliJ idea. app/bin/idea复制原始的.vmoptions文件。vmoptions ~ /图书馆/偏好/ IntelliJIdea12 /想法。然后修改-Xmx设置。
The final file should look like:
最后的文件应如下:
-Xms128m
-Xmx2048m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
Copying the original file is important, as options are not added, they are replaced.
复制原始文件很重要,因为选项不被添加,而是被替换。
This way your custom options will be preserved between updates and application files will remain unmodified making signature checker happy.
这样,您的自定义选项将保留在更新之间,而应用程序文件将保持不变,使签名检查程序满意。
Community Edition: ~/Library/Preferences/IdeaIC12/idea.vmoptions
file is used instead.
Community Edition:~ /图书馆/偏好/ IdeaIC12 /想法。而使用vmoptions文件。
#2
64
Helpful trick I thought I'd share on this old thread.
我想分享这个老掉牙的秘密。
You can see how much memory is being used and adjust things accordingly using the Show memory indicator
setting.
您可以看到正在使用多少内存,并根据显示内存指示器设置调整相应的内容。
It shows up in the lower right of the window.
它出现在窗口的右下角。
#3
14
For IDEA 13 and OS X 10.9 Mavericks, the correct paths are:
对于想法13和OS X 10.9的小牛,正确的路径是:
Original: /Applications/IntelliJ IDEA 13.app/Contents/bin/idea.vmoptions
原:/应用程序/ IntelliJ IDEA 13.应用/内容/ bin / idea.vmoptions
Copy to: ~/Library/Preferences/IntelliJIdea13/idea.vmoptions
复制:~ /图书馆/ / IntelliJIdea13 / idea.vmoptions偏好
#4
11
Here is a link to the latest documentation as of today http://www.jetbrains.com/idea/webhelp/increasing-memory-heap.html
下面是今天最新的文档的链接http://www.jetbrains.com/idea/webhelp/growing -memory-heap.html
#5
4
go to that path "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\bin\idea.exe.vmoptions" and change size to -Xmx512m
转到“C:\程序文件(x86)\ IntelliJ IDEA 12.1.4\bin\ IDEA .exe”路径。并将大小更改为-Xmx512m
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
hope its will work
希望它能工作
#6
3
OSX 10.9, if you dont bother about signed application you might just change
osx10.9,如果您不关心签名应用程序,您可能只需要更改
/Applications/IntelliJ\ IDEA\ 12\ CE.app/bin/idea.vmoptions
#7
2
It looks like IDEA solves this for you (like everything else). When loading a large project and letting it thrash, it will open a dialog to up the memory settings. Entering 2048 for Xmx and clicking "Shutdown", then restarting IDEA makes IDEA start up with more memory. This seems to work well for Mac OS, though it never seems to persist for me on Windows (not sure about IDEA 12).
看起来创意为你解决了这个问题(就像其他事情一样)。当加载一个大型项目并让它通过时,它将打开一个对话框,以提高内存设置。为Xmx输入2048并单击“关机”,然后重新启动IDEA将使IDEA拥有更多的内存。这似乎对Mac OS很有效,尽管它在Windows上似乎永远都不存在(对想法12不确定)。
#8
1
On my machine this only works in bin/idea.vmoptions
, adding the setting in ~/Library/Preferences/IntelliJIdea12/idea.vmoptions
causes the IDEA to hang during startup.
在我的机器上,这个只能在bin/idea中工作。vmoptions,在~/Library/Preferences/IntelliJIdea12/idea中添加设置。vmoptions导致在启动时挂起这个想法。