The corretto I put in Homebrew disappeared after updating, so I fixed it.

After brew update and brew upgradle, corretto updated from 8 to 11 and then disappeared. It is the same even if brew cask reinstalls several times.

In stackoverflow, the problem is also reported that "I installed corretto but it does not come out". I haven't solved it yet.

https://stackoverflow.com/questions/55210519/java-home-utility-in-mac-is-unable-to-find-newly-installed-amazon-corretto-11

After a lot of research, it seems that there was a bug when going from 8 to 11. Once released on 2019-03-14, the modified version has been released again on 2019-03-19.

https://docs.aws.amazon.com/ja_jp/corretto/latest/corretto-11-ug/change-log.html

The brew cask script hasn't been fixed yet ... While looking at the issue on github, I will try to deal with it manually for the time being.

https://github.com/corretto/corretto-11/issues/12

Current status.

$ /usr/libexec/java_home -V

Matching Java Virtual Machines (1):
    1.8.0_92, x86_64:	"Java SE 8"	/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home

$ java -version

java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

cure.

$ sudo ln -sf ../Home/lib/jli/libjli.dylib /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/MacOS/libjli.dylib

$ /usr/libexec/java_home -V

Matching Java Virtual Machines (2):
    11.0.2, x86_64:	"Amazon Corretto 11"	/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home
    1.8.0_92, x86_64:	"Java SE 8"	/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home

$ java -version

openjdk version "11.0.2" 2019-01-15 LTS
OpenJDK Runtime Environment Corretto-11.0.2.9.3 (build 11.0.2+9-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.2.9.3 (build 11.0.2+9-LTS, mixed mode)

fixed. You can fix it just by linking.

Well, I'm sure someday someone will notice and fix the brew cask script as well.


2019-04-11 postscript

It seems that the script has been successfully modified. After brew reinstall corretto, I downloaded it again and it was usable without any problem.

https://github.com/Homebrew/homebrew-cask/commits/master/Casks/corretto.rb

It seems that only checksum was corrected on 3/28. The version does not change, so it will not be updated by cask upgrade.

Recommended Posts

The corretto I put in Homebrew disappeared after updating, so I fixed it.
I can't remember the text file input / output in Java, so I summarized it.
I stumbled on the Java version in Android Studio, so I will summarize it
I want to morphologically analyze the log in the DB and put it in the DB to classify messages 1
I couldn't run it after upgrading the Java version
After posting an article with Rails Simple Calendar, I want to reflect it in the calendar.
After updating to Eclipse 2020-06, some characters were garbled, so I downgraded Eclipse.
"RSpec doesn't work!" The cause was spring, so I investigated it.
I don't understand the devise_parameter_sanitizer method, so I'll output it here.