IntelliJ IDEA error: cannot find vm options file
Asked Answered
K

6

7

I'm trying to launch IntelliJ IDEA but the following error pops up:

Cannot find vm options file

Kragh answered 12/4, 2016 at 22:21 Comment(4)
Does the file exist?Alphonsealphonsine
I looked into IntelliJ's directory, but i cant find it anywhere.Kragh
Okay. Three things: what is your OS? What version of IntelliJ are you running, and have you upgraded it recently? Have you tried reinstalling it?Alphonsealphonsine
Windows 10. IntelliJ Community Edition 15.0.3 and have not upgraded it. I was trying to solve the problem without reinstalling it, but I'm going to do it right now.Kragh
N
2

The explicit solution is to set an environment variable named $IDEA_VM_OPTION:

export IDEA_VM_OPTION="[path-to-'.vmoptions' file]"

Search in the file idea.sh:

grep -ri "vmoption" ./bin/idea.sh

You will see that the search path for .vmoptions file is either:

$HOME/.IntelliJIdea2016.2/idea$BITS.vmoptions

or

$IDE_BIN_HOME/idea$BITS.vmoptions

So, copy file bin/idea64.vmoptions into one of above locations if you have 64 bit JVM installed or file bin/idea.vmoptions else.

Nowell answered 15/11, 2016 at 11:20 Comment(1)
Please use code formatting (four space indent for a block, backlines for inline) to make code snippets more readable. Thanks!Hodman
A
5

This happened to me in Ubuntu 16.4, and the pycharm.vmoptions file was under the bin/ directory.

I was trying to run the shell script with this commands:

cd <path_to_pycharm_installation>/bin
source pycharm.sh

Running the bash script without the "source" command solved it for me:

./pycharm.sh
Alisa answered 30/4, 2017 at 11:3 Comment(0)
N
2

The explicit solution is to set an environment variable named $IDEA_VM_OPTION:

export IDEA_VM_OPTION="[path-to-'.vmoptions' file]"

Search in the file idea.sh:

grep -ri "vmoption" ./bin/idea.sh

You will see that the search path for .vmoptions file is either:

$HOME/.IntelliJIdea2016.2/idea$BITS.vmoptions

or

$IDE_BIN_HOME/idea$BITS.vmoptions

So, copy file bin/idea64.vmoptions into one of above locations if you have 64 bit JVM installed or file bin/idea.vmoptions else.

Nowell answered 15/11, 2016 at 11:20 Comment(1)
Please use code formatting (four space indent for a block, backlines for inline) to make code snippets more readable. Thanks!Hodman
D
1

I fixed this error by rename the name of the file running android studio and the file with the .vmoptions extension the same. The name does not have to be the same as mine, you can give it a name you like, matching the naming requirements of the windows/Linux you are using. I think so (^+^).

enter image description here

Dolor answered 26/3, 2023 at 5:3 Comment(0)
M
0

The following information is current as of April 23, 2019 for version 2019.1.1 of IntelliJ Ultimate that was installed via JetBrains Toolbox app version 1.14.5179

  • Locate the start menu item for IntelliJ. For me, it was at:

    %APPDATA%\Microsoft\Windows\Start Menu\Programs\JetBrains Toolbox\

with the name:

IntelliJ IDEA Ultimate
  • right-click on the above item and choose Properties
  • Change the empty Start In: text box to read: %LOCALAPPDATA%\JetBrains\Toolbox\apps\IDEA-U\ch-0\191.6707.61\bin\

Once the above work-around has been performed, IntelliJ 2019.1.1 Ultimate will stop emitting the error: Error launching IDEA cannot find VM options file

Mirella answered 23/4, 2019 at 15:43 Comment(0)
G
0

In my case it happens because Idea searches the file idea64.vmoptions in folder where I running idea.sh from. I.e. I received such error when tried to run idea.sh file from any place but not from Idea's bin folder. It's because in default idea.sh file the $IDE_BIN_HOME variable gets a real path you are running from. Instead of this it should points to Idea's bin folder where idea.sh and idea64.vmoptions files are.

You can define $IDE_BIN_HOME manually or correct the script to define it automatically. In first variant replace the line

IDE_BIN_HOME=$(dirname "$(realpath "$0")")

with

IDE_BIN_HOME="path/to/Idea's_bin_folder"

For second variant replace that line with

IDE_BIN_HOME=$(dirname "$(realpath "${BASH_SOURCE:-$0}")")
Gratify answered 16/9, 2023 at 14:44 Comment(0)
T
0

For me, it happened because I went to the bin/ folder of Android Studio, copied the studio64.exe file (using Ctrl+C) and pasted into the desktop (using Ctrl+V). The solution was to create a shortcut instead: right-clicking the studio64.exe and selecting Send to > Desktop (Create shortcut).

Twannatwattle answered 29/5 at 12:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.