Ayusman
Ayusman

Reputation: 8719

How to know what JDK IntelliJ IDEA is using

I have looked at:

https://intellij-support.jetbrains.com/hc/en-us/articles/206827547-Selecting-the-JDK-version-the-IDE-will-run-under

and

https://intellij-support.jetbrains.com/hc/en-us/articles/206827537-Configuring-JVM-options-and-platform-properties

How can I know what version and path of JDK my IntelliJ IDEA is using? I have tried setting the environment variable IDEA_JDK. But I am not sure which version of JDK the IDE is picking up. is there a log I could see to verify this?

System information

IntelliJ-IDEA 15
Windows 7, 64 bit

Upvotes: 5

Views: 21257

Answers (4)

Sergey Volkov
Sergey Volkov

Reputation: 1

At linux with ideaCE tar.gz installment default jvm located at path /jbr If you want to change it for idea to use default system jvm, then just rename that "jbr" folder and idea will pick your system default jvm.

Upvotes: 0

Mike Nakis
Mike Nakis

Reputation: 61969

Default locations

On the Mac, the default location is:

/Applications/IntelliJ IDEA <version>.app/Contents/jdk/Contents/Home/jre

On Windows, the default location is:

C:\Program Files\JetBrains\IntelliJ IDEA <version>\jre64

(Does anyone know what the default location is on linux?)

If these default locations do not work, here are two ways to find out the actual location:

Method #1

  • Go to Settings → Build, Execution, Deployment → Build Tools → Maven → Runner
  • Open the "JRE:" dropdown list
  • Select the "Use Internal JRE" entry.
  • Look at the path. (It will probably be abbreviated, so you will probably have to divine it.)

Method #2

  • Execute the "Find Action..." action. The default key binding for this action is Ctrl+Shift+A. This brings up a dialog where you can type the name of any action to find it and execute it.
  • In the dialog that opens, type "Switch" and from the suggested matches select "Switch Boot JDK...". This will execute the "Switch Boot JDK..." action for you, which is not bound to any key by default and it cannot be found in any of the menus.
  • In the dialog that opens you can see the currently selected "Boot JDK". There is even a button to copy the path to your clipboard.

P.S.

I find it amazing that IntelliJ IDEA does not seem to readily provide this information. Every time I install a new version of IntelliJ IDEA I have to go to the IntelliJ IDEA JRE and execute the keytool to install a certificate into this new JRE so that it can access the internal maven repositories that we use. So, every time this happens, I need to know where the internal JRE is. And I usually have to do it both for the mac at work and for windows at home, which is quite tedious.

Upvotes: 5

popstr
popstr

Reputation: 1110

JVM version and name (but not path) is visible in the Help->About dialog.

Upvotes: 1

Ashutosh Jindal
Ashutosh Jindal

Reputation: 18869

Please look at the https://intellij-support.jetbrains.com/hc/en-us/articles/206827517-Locating-IDE-log-files to locate the log file which has the command used to start Intellij IDEA

For example, on OSX, ~/Library/Logs/IntelliJIdea15/idea.log has the following:

2015-10-17 16:26:52,339 [   1086]   INFO -        #com.intellij.idea.Main - JRE: 1.8.0_40-release-b94 (JetBrains s.r.o)
2015-10-17 16:26:52,339 [   1086]   INFO -        #com.intellij.idea.Main - JVM: 25.60-b23 (OpenJDK 64-Bit Server VM)
2015-10-17 16:26:52,378 [   1125]   INFO -        #com.intellij.idea.Main - JVM Args: <snip>

If you don't have the Help -> Show log in explorer option, then please search for the file at c:\Users\Auyshman\.IntelliJIdea15\system\log\idea.log

Another alternative is to use Process Explorer and add/enable the column called 'Image Path' to see the complete path of the process for Intellij. This should show the JDK/JRE being used to invoke Intellij as well.

Upvotes: 4

Related Questions