How to change JRE for PhpStorm on MacOs
macos, phpstorm
Solution
Quoting from the "Selecting the JDK version the IDE will run under" article in the Knowledge Base posted on March 27, 2013
Mac OS X
At the moment all our products require Apple JDK 1.6 to be installed in order to run on Mac. JDK 1.7 from Oracle is not officially supported yet and has known problems that stop us from using it by default. Oracle JDK 1.7.0_40 has added support for Retina and works much better than previous versions on Mac. You are welcome to give it a try in case you have any problems with Apple JDK.
To force running under JDK 1.7 edit /Applications/.app/Contents/Info.plist file, change JVMVersion from 1.6* to 1.7* :
<key>JVMVersion</key>
<string>1.7*</string>
- See this answer for the known problems with JDK 1.7.
- IDEA_JDK environment variable can be used to override the selected JDK, you may need to run the product from the Terminal so that it sees your environment variables (Mac OS limitation): open -a /Applications/.app/ .
- Application About dialog will show the actual JDK version.
Problem
It seems, with the latest MAcOs updates, that Java was also updated, which influenced PhpStorm performance very badly. Anyway, I decided to update my Java. Was ``` $ java -version java version "1.6.0_51" Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509) Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode) ``` After downloading Java SDK from Oracle and installing: ``` $ java -version java version "1.7.0_25" Java(TM) SE Runtime Environment (build 1.7.0_25-b15) Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode) ``` But in PhpStorm it still shows the old JRE: I also restarted my computer, but still the old JRE is shown. Please help, how to make PHPStorm use a new JRE?