java IntelliJ IDEA 12.0 JVM 启动错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13842165/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
IntelliJ IDEA 12.0 JVM Startup Error
提问by Philip Tenn
I just upgraded to IntelliJ IDEA 12.0
and get an error immediately upon attempting to launch:
我刚刚升级到IntelliJ IDEA 12.0
并在尝试启动时立即收到错误:
The JVM could not be started. The maximum heap size (-Xmx) might be too large or
an antivirus or firewall tool could block the execution.
I checked my idea.exe.vmoptions
file and the maximum heap size is only 640m (I have 8 GB physical memory and am not running any other applications).
我检查了我的idea.exe.vmoptions
文件,最大堆大小只有 640m(我有 8 GB 物理内存,没有运行任何其他应用程序)。
idea.exe.vmoptions
想法.exe.vmoptions
-Xms128m
-Xmx640m
-XX:MaxPermSize=640m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
I still have IntelliJ IDEA 11.4
on my machine and I am able to run that (using the same values for max heapsize in idea.exe.vmoptions
). Since IntelliJ IDEA 11.4
runs, I don't believe it is an antivirus or firewall issue. I have also checked those settings as well.
我仍然有IntelliJ IDEA 11.4
我的机器上,我能够运行(使用相同的值,在最大堆大小idea.exe.vmoptions
)。由于IntelliJ IDEA 11.4
运行,我不认为这是防病毒或防火墙问题。我也检查了这些设置。
Anyone run across this or have any idea (no pun intended)?
任何人都遇到过这个或有任何想法(没有双关语)?
采纳答案by CrazyCoder
Please see this answerfor the problem background and the solution.
请参阅此答案以了解问题背景和解决方案。
Your questions seems to be the exact duplicate of:
您的问题似乎与以下问题完全相同:
回答by zmanc
Assuming you are on windows I am curious why you are running the 32bit version of intellij when you have a 64bit machine?
假设你在 Windows 上,我很好奇你为什么在 64 位机器上运行 32 位版本的 intellij?
I was having the same error and found that there was two things going on. The first was that the link I had in the taskbar was pointing to the idea.exe instead of the idea64.exe, which meant I was only launching the 32bit version of intelliJ.
我遇到了同样的错误,发现发生了两件事。首先是我在任务栏中的链接指向idea.exe而不是idea64.exe,这意味着我只启动了32位版本的intelliJ。
Second there is another file for vm options for the 64bit. idea64.exe.vmoptions
其次,还有另一个 64 位 vm 选项文件。idea64.exe.vmoptions
After switching to the 64bit exe and making sure the vm options I wanted were correct in the vmoptions file I did not have any further issues.
切换到 64 位 exe 并确保我想要的 vm 选项在 vmoptions 文件中正确后,我没有任何进一步的问题。
On another interesting note I found that on 32bit machines when the 32bit version of intelliJ was set to have 1gb of memory for -Xmx and I had chrome open I would get the error. If I closed chrome I would no longer get the error. I think this had something to do with the jvm verifying that the required amount of memory was available before launching.
在另一个有趣的注意事项中,我发现在 32 位机器上,当 32 位版本的 intelliJ 设置为 -Xmx 的内存为 1gb 并且我打开了 chrome 时,我会收到错误消息。如果我关闭 chrome,我将不再收到错误消息。我认为这与 jvm 在启动之前验证所需的内存量是否可用有关。
回答by Dan Moldovan
Try to configure your idea to the default values
尝试将您的想法配置为默认值
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
VM options are loaded from the IDE_HOME\bin\[bits][.exe].vmoptions file.
VM 选项从 IDE_HOME\bin\[bits][.exe].vmoptions 文件加载。
更多信息:https: //intellij-support.jetbrains.com/entries/23393413-The-JVM-could-not-be-started-The-main-method-may-have-thrown-an-exception
回答by Agnes
I found that switching from a 32-bit version to a 64-bit version caused the issue, as my windows shortcuts still pointed to the old idea.exe and not the correct idea64.exe.
我发现从 32 位版本切换到 64 位版本导致了这个问题,因为我的 Windows 快捷方式仍然指向旧的 idea.exe 而不是正确的 idea64.exe。