Homebrew-cask: How do I install java 1.7 with cask?

Created on 6 Feb 2015  路  21Comments  路  Source: Homebrew/homebrew-cask

Sorry if this is somewhere on the documentation but I can't seem to find it. I need to install java 1.7 but running brew cask install java installs 1.8

Most helpful comment

brew tap caskroom/versions
brew cask install java7

All 21 comments

brew tap caskroom/versions
brew cask install java7

As @thesbros mentioned, it is available in the caskroom/versions repo.

Hello @materechm. As @thesbros kindly anticipated, old Java versions are available in the caskroom/versions repository. If caskroom/versions is not currently tapped, you can install java7 with a one-liner:

brew cask install caskroom/versions/java7

@ndr-qef is this still the case? I'm getting the following error:

$ brew cask install caskroom/versions/java7
Error: No available cask for caskroom/versions/java7

I don't use OS X anymore so I can't test, but it seems to still exist, so it should be working.

@mrluc your caskroom/versions tap may be outdated. Run brew update and try again.

@jawshooah thanks - in fact it turned out that my brew-cask was (quite) out of date! Getting latest resolved the issue.

Same for me.

$ brew install Caskroom/versions/java7
==> brew cask install Caskroom/versions/java7
Error: Cask 'java7' definition is invalid: Bad header line: parse failed

Fixed by a brew upgrade brew-cask

I had to manually open it.
cd cd /Users/you/Library/Caches/Homebrew/Cask/
open .
click on java7--1.7.0_80.dmg

When I run brew cask install java7, I get this:

==> Caveats
This Cask makes minor modifications to the JRE to prevent any packaged
application issues.

If your Java application still asks for JRE installation, you might need to
reboot or logout/login.

The JRE packaging bug is discussed here:

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361

Installing this Cask means you have AGREED to the Oracle Binary Code License
Agreement for Java SE at

    http://www.oracle.com/technetwork/java/javase/terms/license/index.html

==> Downloading http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-macosx-x64.dmg
######################################################################## 100.0%
curl: (22) The requested URL returned error: 404 Not Found
Error: Download failed on Cask 'java7' with message: Download failed: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-macosx-x64.dmg
The incomplete download is cached at /Users/xyu/Library/Caches/Homebrew/Cask/java7--1.7.0_80.dmg.incomplete

It seems the URL: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-macosx-x64.dmg doesn't exist anymore.

@vitorgalvao @jawshooah or maybe someone else, this issue is closed but i see I'm not the only one to experience the problem described by @xiaochuanyu just above.

Is there an ETA for this ?
Is there another thread tracking this problem ?

Thank you in advance !

@GBarthos That version of java is no longer supported by us. See https://github.com/caskroom/homebrew-versions/pull/3914.

ok thanks for the quick reply

@luishmelo, that link is redirecting me to a login page.

@luishmelo, that link is redirecting me to a login page.

Same.

Releases of JDK 7 are only available for Oracle Customers through My Oracle Support.

also: http://www.oracle.com/technetwork/java/javase/downloads/index.html in Section JDK 7.

JDK 7 is still available through Oracle Archive Downloads. http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html

It still requires a login.

@commitay auch. I didn't notice that. Too bad. :/ (regular oracle account is enough though)

From the other thread: brew cask install caskroom/versions/zulu7

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mmoehring picture mmoehring  路  3Comments

GeekOnGadgets picture GeekOnGadgets  路  3Comments

orome picture orome  路  3Comments

vasigorc picture vasigorc  路  3Comments

jrwiegand picture jrwiegand  路  3Comments