IntelliJ IDEA 9 不能启动

来源:互联网 发布:c语言status函数声明 编辑:程序博客网 时间:2024/06/02 15:26

前些天下了个IntelliJ IDEA 9 Ultimate,安装后不能启动,到bin目录下,运行idea.bat,也是不能启动,后来修改idea.bat,

将 IF "%IDEA_JDK%" == "" SET IDEA_JDK=%JDK_HOME% 改为:

IF "%IDEA_JDK%" == "" SET IDEA_JDK=%JAVA_HOME%   后可以启动了。

 

早上上网查了下,jetbrains网站上有关于这个问题的文章:

"The JVM could not be started. The main method may have thrown an exception" error when starting idea.exe

 

In IDEA 9.0 we've raised the default heap settings to the following values (see idea.exe.vmoptions file):

 

-Xms128m-Xmx512m-XX:MaxPermSize=250m

 

On some systems the error in subject occurs when trying to run IDEA. It happens because the native idea.exe executable built with the exe4j uses the splash screen which loads a dll (to decode the splash image) in the address space of the process. The jvm.dll loaded after the splash needs to allocate the heap memory in one chunk, however the dll loaded before the jvm.dll can fragment the address space (limited to 2GB for the 32-bit applications) too much and there will be no single chunk of free memory required for the JVM to initialize.

 

Depending on the other DLLs loaded, applications with DLL hooks and drivers installed on the system, IDEA may be not able to start even with relatively low heap size of 512m.

 

Workarounds:

  • use idea.bat to run IDEA (you need to set IDEA_JDK environment variable pointing to the JDK 1.6 installation first)
  • lower heap size in idea.exe.vmoptions to 400m or the value when JVM can be started reliably on your system
  • replace idea.exe with the new version attached to this document which doesn't show splash screen and therefore is not affected by this bug

 

We plan to address this issue in IDEA 9.0.1 release which will be available before the New Year 2010 by disabling the native splash screen in the executable wrapper.

 

Bonus:

  • in the idea.zip file attached to this document you will also find idea64.exe which allows you to run IDEA under 64-bit JDK (don't forget to set IDEA_JDK environment variable to point to your 64-bit JDK 1.6 installation directory). Good thing is that you can delete jre directory under IDEA installation directory to save some disk space. Running under 64-bit JVM allows to use higher heap size (if necessary), however doesn't use memory efficiently (has overhead), add -XX:+UseCompressedOops VM option to save some memory.

 

试了下修改-Xmx512m 成 -Xmx450m后,可以使用idea.exe启动了。。

 

原创粉丝点击