简体   繁体   English

IntelliJ IDEA 12.0 JVM启动错误

[英]IntelliJ IDEA 12.0 JVM Startup Error

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文件,最大堆大小只有idea.exe.vmoptions (我有8 GB的物理内存,并没有运行任何其他应用程序)。

idea.exe.vmoptions idea.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 ). 我的机器上仍然有IntelliJ IDEA 11.4 ,我可以运行它(在idea.exe.vmoptions使用相同的max heapsize值)。 Since IntelliJ IDEA 11.4 runs, I don't believe it is an antivirus or firewall issue. IntelliJ IDEA 11.4运行以来,我不认为它是防病毒或防火墙问题。 I have also checked those settings as well. 我也检查过这些设置。

Anyone run across this or have any idea (no pun intended)? 任何人遇到这个或有任何想法(没有双关语)?

Please see this answer for the problem background and the solution. 有关问题背景和解决方案,请参阅此答案

Your questions seems to be the exact duplicate of: 您的问题似乎与以下内容完全相同:

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. 第二个是64位的vm选项的另一个文件。 idea64.exe.vmoptions 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. 在另一个有趣的说明中,我发现在32位机器上,当32位版本的intelliJ设置为1GB内存用于-Xmx并且我打开了chrome时,我会得到错误。 If I closed chrome I would no longer get the error. 如果我关闭了chrome,我将不再收到错误。 I think this had something to do with the jvm verifying that the required amount of memory was available before launching. 我认为这与jvm有关,在启动之前验证所需的内存量是否可用。

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文件加载。

More info: https://intellij-support.jetbrains.com/entries/23393413-The-JVM-could-not-be-started-The-main-method-may-have-thrown-an-exception 更多信息: https//intellij-support.jetbrains.com/entries/23393413-The-JVM-could-not-be-started-The-main-method-may-have-thrown-an-exception

我发现从32位版本切换到64位版本导致了这个问题,因为我的Windows快捷方式仍然指向旧的idea.exe而不是正确的idea64.exe。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM