You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

启动IntelliJ IDEA失败求助:Failed to create JVM错误代码-1

Fixing "Failed to Create JVM Error Code -1" in IntelliJ IDEA (Even After Setting IDEA_JDK_64)

Hey there, sorry to hear you're hitting this frustrating JVM error when launching IntelliJ IDEA—especially since Eclipse runs fine, that makes this extra head-scratching. Let’s work through some targeted fixes that usually resolve this issue:

  • Override VM options directly in IntelliJ's config file
    Since Eclipse works, your system JDK is likely solid—so the problem might be in IntelliJ's own VM settings conflicting with your environment variable. Here's what to do:

    1. Navigate to your IntelliJ config folder:
      • Windows: %USERPROFILE%\.IntelliJIdea<your-version>\config
      • Mac: ~/Library/Application Support/JetBrains/IntelliJIdea<your-version>
      • Linux: ~/.config/JetBrains/IntelliJIdea<your-version>
    2. Open the idea64.exe.vmoptions file (for 64-bit IDEs, which you’re using) with a plain text editor.
    3. Tweak these critical settings:
      • Lower the maximum heap size (-Xmx) if it’s set too high. For example, if you have 8GB of RAM, switch from -Xmx8g to -Xmx4g—overallocating memory often causes this JVM failure.
      • If you’re using JDK 17 or newer, add this line to bypass module access restrictions: --add-opens java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
    4. Save the file and try launching IDEA again.
  • Double-check your IDEA_JDK_64 environment variable
    Even though you added it, typos or incorrect paths can sneak in:

    1. Open Command Prompt (Windows) or Terminal (Mac/Linux).
    2. Run echo %IDEA_JDK_64% (Windows) or echo $IDEA_JDK_64 (Mac/Linux) to confirm the path.
    3. Ensure it points to a valid 64-bit JDK (not JRE)—for example, C:\Program Files\Java\jdk-17.0.9.
    4. Pro tip: Steal the working JDK path from Eclipse! Check Eclipse’s eclipse.ini file for the -vm line to get a guaranteed valid path.
  • Reset corrupted cache or disable problematic plugins
    Corrupted cache or incompatible plugins can block the JVM from starting. Try launching in safe mode first:

    1. Navigate to IntelliJ’s bin folder (e.g., C:\Program Files\JetBrains\IntelliJ IDEA <version>\bin on Windows).
    2. Run idea64.exe --safe-mode (Windows) or ./idea.sh --safe-mode (Mac/Linux).
      If IDEA launches successfully here, a plugin is the culprit. Head to File > Settings > Plugins to disable recently installed/updated plugins, then restart normally.
      If safe mode fails, delete the cache folder:
    • Windows: %USERPROFILE%\.IntelliJIdea<your-version>\system\caches
    • Mac: ~/Library/Caches/JetBrains/IntelliJIdea<your-version>
    • Linux: ~/.cache/JetBrains/IntelliJIdea<your-version>
  • Rule out system-wide conflicts
    Sometimes third-party software interferes with JVM launch:

    • Temporarily disable your antivirus/firewall and try launching IDEA.
    • Kill any stuck Java processes running in the background (use Task Manager on Windows, Activity Monitor on Mac, or ps aux | grep java on Linux to identify and terminate them).

If none of these fixes work, you could try a clean reinstall of IntelliJ IDEA—just make sure to back up your settings via File > Export Settings if you can access the IDE in safe mode first.

内容的提问来源于stack exchange,提问作者Steeve

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:12:04