IntelliJ 无法从终端打开

iwe*_*esi 3 macos terminal intellij-idea

我在一些教程中看到可以从终端在 IntelliJ 中打开现有的 Maven 项目。( open terminal; cd < folder containing pom.xml >; idea pom.xml)

当我这样做时,我收到以下错误:

文件 /private/var/folders/vx/g0dkgs9s7wg7bz8q3yplhwxh0000gn/T/AppTranslocation/A27A814D-1A7C-45BB-88E0-E2ACCA590517/d/IntelliJ IDEA.app 不存在。

我使用的是 macOS High Sierra 10.13.2。

我尝试卸载并重新安装,但没有成功。

有人可以帮我找出问题所在吗?

Rob*_*rMP 5

当升级到新版本的 IntelliJ 或升级我的操作系统(Mojave)时,我时常会遇到这种情况。以下是我在 macOS 中修复该问题所执行的步骤:

  • 检查可执行文件所在的位置:(which idea可能是 /usr/local/bin/idea
  • 我收到Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/182.4129.33/IntelliJ IDEA.app does not exist.错误,因此我查找 ch-0 文件夹并获取182.5107.16 183.4284.148. 这就是问题所在,Intellij 仍然指向不存在的先前版本。
  • 打开步骤 1 中的 idea 可执行文件并检查以下部分

    RUN_PATH = u'/Users/robertomoreno/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/182.4129.33/IntelliJ IDEA.app' CONFIG_PATH = u'/Users/robertomoreno/Library/Preferences/ IntelliJIdea2018.2' SYSTEM_PATH = u'/Users/robertomoreno/Library/Caches/IntelliJIdea2018.2'

  • 使用正确的版本更改它:

    RUN_PATH = u'/Users/robertomoreno/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4284.148/IntelliJ IDEA.app' CONFIG_PATH = u'/Users/robertomoreno/Library/Preferences/ IntelliJIdea2018.3' SYSTEM_PATH = u'/Users/robertomoreno/Library/Caches/IntelliJIdea2018.3'

  • idea path/to/file.is现在应该可以工作了