Unexpected JDK detection error in macOS
See original GitHub issue“To use Java command-line tools you need to install a JDK”
Here’s what I do:
➜ ~ bloop server
Defaulting on nailgun port 8212
There is no server running at port 8212
Starting the bloop server... this may take a few seconds
Running /usr/local/Cellar/bloop/1.4.0-RC1/bin/blp-server as a jar...
Shelling out with '['java', '-jar', '/usr/local/Cellar/bloop/1.4.0-RC1/bin/blp-server']' ...
Error: Invalid or corrupt jarfile /usr/local/Cellar/bloop/1.4.0-RC1/bin/blp-server
Running /usr/local/Cellar/bloop/1.4.0-RC1/bin/blp-server as a script...
Shelling out in Unix system with ['sh', '/usr/local/Cellar/bloop/1.4.0-RC1/bin/blp-server']
Detected java options are ''
Unable to find any JVMs matching version "1.8".
No Java runtime present, requesting install.
Bloop server in /usr/local/Cellar/bloop/1.4.0-RC1/bin/blp-server failed to run.
First invocation attempt: ['java', '-jar', '/usr/local/Cellar/bloop/1.4.0-RC1/bin/blp-server']
-> Return code: 1
Second invocation attempt: ['sh', '/usr/local/Cellar/bloop/1.4.0-RC1/bin/blp-server']
-> Return code: 2
➜ ~ java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)
➜ ~ echo $JAVA_HOME
/Users/jules.ivanic/.sdkman/candidates/java/current
When, I’m launching the bloop server
command the following Macos popup shows up:
I installed the JDK with SDKMAN (https://sdkman.io/).
My JAVA_HOME
is correctly set.
How can I fix that?
Thanks, Jules
Issue Analytics
- State:
- Created 4 years ago
- Comments:21 (9 by maintainers)
Top Results From Across the Web
MAC A fatal error has been detected by the Java Runtime ...
Try to use a shell terminal and type in: export LD_BIND_NOW=1.
Read more >Known Issues for JDK 8 - Oracle
This document describes known issues in the Oracle JDK 8 release.
Read more >Java Control Panel quit unexpectedly whil… - Apple Community
Java Control Panel quit unexpectedly while using the libjvm.dylib plug-in. ... OS X Server1 0.8.4, Mac Mini (5,1), Java 7u25 (jre-7u25-macosx-x64.
Read more >How to Fix UnsupportedClassVersion Error in Java - Rollbar
The UnsupportedClassVersionError in Java occurs when the JVM attempts to read a malformed or otherwise erroneous class file.
Read more >Change the boot Java runtime of the IDE | IntelliJ IDEA ...
Changing the boot Java runtime may cause unexpected problems. ... IntelliJ IDEA lists all the JDKs and JREs that it was able to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for reporting @guizmaii. This issue happens because
/usr/libexec/java_home
doesn’t support sdkman. @ahjohannessen has also reported the same issue in Discord.I plan to fix this by getting rid of
java_home
in the macOS brew formula so that we don’t force JDK 8 on macOS. This is a thing inherited from the past where bloop didn’t support JDK 11 and where I was wary of supporting JDK 11 over JDK 8 because it produces slower compilation. That will change in the release of v1.4.0.Setting
$HOME/.bloop/bloop.json
hasn’t worked for me (macOS)But that fixed it:
brew uninstall bloop
(1.4.4)export JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home"
brew install bloop
bloop exit
bloop about