Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade to latest version of java JDK using homebrew cask?

I have been following these instructions to install the latest java jdk:

www.lonecpluspluscoder.com/2017/04/27/installing-java-8-jdk-os-x-using-homebrew/

brew cask install java

This works great, but when a new version comes out, how do I make sure I can upgrade to that version and ensure that old versions of the jdk are not sitting around on my system?

like image 415
Rolando Avatar asked May 30 '17 23:05

Rolando


2 Answers

Warning: Calling brew cask reinstall is deprecated! Use brew reinstall instead

brew reinstall java

like image 71
roosheee Avatar answered Oct 13 '22 11:10

roosheee


brew cask reinstall java

This command will uninstall old version of jdk and install the latest version

like image 23
Ce7 Avatar answered Oct 13 '22 11:10

Ce7