I'm trying to launch IntelliJ IDEA but the following error pops up:
Cannot find vm options file
I'm trying to launch IntelliJ IDEA but the following error pops up:
Cannot find vm options file
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.
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
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.
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 (^+^).
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
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
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}")")
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).
© 2022 - 2024 — McMap. All rights reserved.