/Command Line Installation of Legacy Java on Mac

Command Line Installation of Legacy Java on Mac

There are a few apps which still require the legacy Java to work. If you need to install the legacy Java using command line. Follow these steps.

curl  -Lo javaforosx.dmg  "http://support.apple.com/downloads/DL1572/en_US/javaforosx.dmg" 
hdiutil attach javaforosx.dmg 
sudo installer -pkg /Volumes/Java\ for\ OS\ X\ 2015-001/JavaForOSX.pkg -target /
hdiutil detach /Volumes/Java\ for\ OS\ X\ 2015-001/