On startup IDEA shows "Please consider switching to the bundled Java runtime that is better suited for the IDE"

Answered

I upgraded IntelliJ IDEA on my Mac from 2018.3 to 2019.3.2 recently, and ever since the upgrade IntelliJ has begun to display this message each startup:

"Please consider switching to the bundled Java runtime that is better suited for the IDE (your current Java runtime is 1.8.0_241-b7 by Oracle Corporation)."

I've tried the following things:

1) Clicked the 'Switch' link and restarted, but it continues to show the message.

2) Stopped IntelliJ, deleted these directories, and restarted:

~/Library/Preferences/IntelliJIdea2019.3
~/Library/Caches/IntelliJIdea2019.3

But it continues to show the message.

3) Installed the Choose Runtime plugin. When I use the Choose Runtime... action, it prompts me to pick one of these Runtimes:

  • build 1.8.0_241-b07
  • build 1.8.0_101-b13
  • jbsdk11b102_osx_x64.tar.gz
  • jbsdk11b105_osx_x64.tar.gz
  • jbsdk11b109_osx_x64.tar.gz
  • jbsdk11b110_osx_x64.tar.gz
  • jbsdk11b113_osx_x64.tar.gz

I tried choosing the last one, 'jbsdk11b113_osx_x64.tar.gz', but then on startup it shows the message "Early Access Java versions may cause compatibility issues. Use a stable release version.".  So I reverted back to Oracle 1.8.0_241-b07.

Any suggestions of what to try next?

Thanks,
Jake

1
9 comments

Could you try selecting the 11.0.5+10-b520.30 version in Choose runtime plugin and select it to install and reboot. If problem remains please attach screenshot showing the message and idea.log (Help | Show Log in ... action) file after reproducing.

As a workaround you can download the IDE with bundled runtime from https://www.jetbrains.com/idea/download/ 

0
Avatar
Permanently deleted user

Thanks Andrey for the reply.  I don't see 11.0.5+10-b520.30 listed as an option in the Choose Runtime plugin.  I also tried redownloading and reinstalling the IDE, but the problem continued to occur.  But, I found a solution on this JetBrains support page:

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

  1. Stop IntelliJ
  2. Delete the file ~/Preferences/IntelliJIdea2019.3/idea.jdk
  3. Start IntelliJ

IntelliJ then defaulted to the bundled Java JDK.  Thanks,
Jake

0
Avatar
Permanently deleted user

I have the same problem with 2019.3.4 on macOS Catalina 10.15.4.

I've tried using Choose Runtime plugin – and I've tried manually setting a path in the idea.jdk file –  but after a restart the idea.jdk file is always missing and IDEA defaults to an old JDK 1.8 runtime 1.8.0_201-b09 from inside /Library/Java/JavaVirtualMachines

The IntelliJ app definitely has a bundled JVM:

$ /Applications/IntelliJ\ IDEA.app/Contents/jbr/Contents/Home/bin/java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+8-b520.43)
OpenJDK 64-Bit Server VM (build 11.0.6+8-b520.43, mixed mode)

but I can't make IntelliJ use it.

0

What is the full path to idea.jdk file you are looking for?

0
Avatar
Permanently deleted user

~/Preferences/IntelliJIdea2019.3/idea.jdk

0

Do you mean that this file is removed after restart even if you create it manually and don't use the Choose Runtime plug-in? Any related errors in the logs? https://intellij-support.jetbrains.com/hc/articles/207241085 .

Are there any external sync/backup tools that may affect IDE config directory conents?

Please try running IDE from the command line per https://intellij-support.jetbrains.com/hc/en-us/articles/360011901879-How-to-start-IDE-from-the-command-line and before that set the following environment variable in the Terminal. Provide the full output here.

export IDEA_LAUNCHER_DEBUG=true

 

0
Avatar
Permanently deleted user

launcher debug logs:

2020-04-03 06:57:46.665 idea[1771:18229] Reading at /Users/michael/Library/Preferences/IntelliJIdea2019.3/idea.properties OK
2020-04-03 06:57:46.665 idea[1771:18229] user JavaVersion from custom configs, which mentioned in idea.properties 1.8*
2020-04-03 06:57:46.665 idea[1771:18229] allVms required 1.8*
2020-04-03 06:57:46.666 idea[1771:18229] Can't get bundled java version. It is probably corrupted.
2020-04-03 06:57:46.669 idea[1771:18229] Found Java Virtual Machines:
2020-04-03 06:57:46.670 idea[1771:18229] /Applications/IntelliJ IDEA.app/Contents/jbr
2020-04-03 06:57:46.670 idea[1771:18229] /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk
2020-04-03 06:57:46.670 idea[1771:18229] /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk
2020-04-03 06:57:46.670 idea[1771:18229] /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk
2020-04-03 06:57:46.670 idea[1771:18229] Required VMs: 1.8*
2020-04-03 06:57:46.670 idea[1771:18229] Chosen VM:
2020-04-03 06:57:46.670 idea[1771:18229] /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk
2020-04-03 06:57:46.671 idea[1771:18240] Value of IDEA_VM_OPTIONS is (null)
2020-04-03 06:57:46.671 idea[1771:18240] Processing VMOptions file at /Users/michael/Library/Preferences/IntelliJIdea2019.3/idea.vmoptions
2020-04-03 06:57:46.671 idea[1771:18240] Reading at /Users/michael/Library/Preferences/IntelliJIdea2019.3/idea.vmoptions OK
2020-04-03 06:57:46.671 idea[1771:18240] Done

The contents of ~/Library/Preferences/IntelliJIdea2019.3/idea.properties is

idea.popup.weight=heavy
idea.dynamic.classpath=false
swing.bufferPerWindow=false
CVS_PASSFILE=~/.cvspass
idea.smooth.progress=false
idea.max.intellisense.filesize=2500
idea.xdebug.key=-Xdebug
apple.awt.fullscreencapturealldisplays=false
idea.cycle.buffer.size=1024
java.endorsed.dirs=
com.apple.mrj.application.live-resize=false
sun.java2d.noddraw=true
sun.java2d.pmoffscreen=false
idea.use.default.antialiasing.in.editor=false
idea.fatal.error.notification=disabled
apple.awt.graphics.UseQuartz=true
idea.no.launcher=false
JVMVersion=1.8*
sun.java2d.d3d=false
apple.laf.useScreenMenuBar=true

and removing that JVMVersion line has fixed it – IDEA is now using the bundled JDK!

I've no idea why that was in there in the first place – maybe I set it years ago?!

Anyway, thanks for the help :)

0

There is no idea.properties file by default in that location, it looks like you've customized it long time ago and it was imported from the previous versions. Thanks for th details.

0

why not just stick to the bundled one? I run linux (setup should be similar to Mac OS, also running a proper shell, etc) and just as there is a JAVA_HOME you've probably setup to your favorite flavor, there's the IDEA_JDK

ola : [ 21:01 ] > cat $HOME/.tcshrc | grep IDEA
setenv IDEA_JDK /home/ola/intellij/idea-IU-221.5591.52/jbr

environment variable you can setup in similar fashion. if you look into the idea.sh script shipped with intellij in the bin folder, you will see that it evaluates this property sort of first and foremost. for all you (poor) windows users out there, most probably this property can be added to your runtime environment using windows tools. 

If this doesn't work the setting is stuck in you user's saved settings, check https://www.jetbrains.com/help/idea/switching-boot-jdk.html, the section at the end on the idea.jdk. Or, if you have saved your exported settings elsewhere for re-import, just exit intellij, clear them all like # rm -rf $HOME/.config/JetBrains/* make sure your IDEA_JDK is setup correctly and re-start.

0

Please sign in to leave a comment.