0

I've changed VM options in ~/.WebStorm2016.3/webstorm.exe.vmoptions through Help -> Edit custom VM options menu to the following:

# custom WebStorm VM options

-server
-Xms740m   <----------------
-Xmx3050m  <----------------
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow

After that, WebStorm is not launching. Why?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Max Koretskyi
  • 101,079
  • 60
  • 333
  • 488
  • *"After that, WebStorm is not launching. Why?"* because Java (JVM?) is unable to allocate that much memory (which needs to be done in 1 solid chunk .. which is very problematic on 32-bit). If you need that much memory (3GB) -- use 64-bit JDK and 64-bit WebStorm launcher. – LazyOne Feb 18 '17 at 20:11
  • 1) https://intellij-support.jetbrains.com/hc/en-us/articles/207241105-The-JVM-could-not-be-started-The-main-method-may-have-thrown-an-exception 2) https://intellij-support.jetbrains.com/hc/en-us/articles/206544869-Configuring-JVM-options-and-platform-properties – LazyOne Feb 18 '17 at 20:13
  • thanks, but I have both 64bit webstorm and JDK - `Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)`. However, it seems that `open JDK server vm is used`. Don't know how to check it's bit – Max Koretskyi Feb 18 '17 at 20:15
  • 1
    https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under ... or just use 2017.1 EAP build -- it comes with and uses 64-bit JDK by default. if anything -- check `idea.log` for details (or Help | About) -- it should have bit info there – LazyOne Feb 18 '17 at 20:29
  • Alternatively: 1) `Help | Find Action...` 2) Search for `Switch IDE boot JDK...` and run that action 3) Do the needed changes there – LazyOne Feb 18 '17 at 20:35
  • thanks, _it comes with and uses 64-bit JDK by default_ - which JDK? Java's or Open JDK by Jetbrains? You can post your comments as an answer. They are very helpful. – Max Koretskyi Feb 19 '17 at 06:53

1 Answers1

1

After that, WebStorm is not launching. Why?

That's because Java (JVM?) is unable to allocate that much memory (3GB; which needs to be done in 1 solid chunk .. that's is very problematic when using 32-bit JDK).

Better switch to using 64-bit JDK and 64-bit WebStorm launcher which can handle such situations if you need that much memory.

If you need more info on that -- please check this StackOverflow question and those that offered in Related section: Java 32bit Xmx vs java 64bit Xmx .

Other links to the actual JetBrains' articles on this/related subject:


If you do not know how to start using 64-bit WebStorm, please check this arcticle or just use 2017.1 EAP build -- from 2017.1 JetBrains IDEs come with and use own 64-bit JDK by default.

If anything -- check idea.log for details (or Help | About) -- it should have bit info there.

Alternatively:

  1. Help | Find Action...
  2. Search for Switch IDE boot JDK... action (typing just jdk should be enough to have that action preselected) and run that action
  3. Do the needed changes there
Community
  • 1
  • 1
LazyOne
  • 158,824
  • 45
  • 388
  • 391