Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

java7 cannot be installed on yosemite #441

Closed
toonetown opened this issue Sep 27, 2014 · 2 comments
Closed

java7 cannot be installed on yosemite #441

toonetown opened this issue Sep 27, 2014 · 2 comments

Comments

@toonetown
Copy link
Contributor

The java installer cannot be installed on yosemite - which breaks the java7 cask.

There is a workaround (described at http://java.wildstartech.com/Java-Platform-Standard-Edition/mac-os-x-java-development/how-to-install-java-on-yosemite) which basically patches the SystemVersion.plist to "pretend" like it's 10.9 and then patch it back.

Basically, it runs:

sudo sed -i '' 's/>10.10</>10.9</' /System/Library/CoreServices/SystemVersion.plist

before installation, and then runs:

sudo sed -i '' 's/>10.9</>10.10</' /System/Library/CoreServices/SystemVersion.plist

after installation.

The change would be trivial to implement in the cask definition, however, it seems a bit "dangerous" to me (you'd need to make sure that the second command runs no matter what, even if the installation fails).

Another alternative, described at http://gabrielrinaldi.me/how-to-install-jdk-7-on-yosemite-10-10/ details a way to expand the package, patch the erroneous check, and then re-package it. That is not as trivial as the other approach, but is a bit "safer", perhaps.

Or, we just wait for Oracle to release a version of the Java7 installer that works on Yosemite.

I just wanted to log out this issue to see if there were any suggestions.

@radeksimko
Copy link
Contributor

I'm not experiencing this issue, see below.

vagrant-osx-10-10:~ vagrant$ brew cask install java7 --verbose
==> We need to make Caskroom for the first time at /opt/homebrew-cask/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
==> 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/7u72-b14/jdk-7u72-macosx-x64.dmg
/usr/bin/curl -fLA Homebrew 0.9.5 (Ruby 2.0.0-481; Mac OS X 10.10.1) http://download.oracle.com/otn-pub/java/jdk/7u72-b14/jdk-7u72-macosx-x64.dmg -C 0 -o /Library/Caches/Homebrew/java7-1.7.0_72.dmg.incomplete -b oraclelicense=accept-securebackup-cookie
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:10 --:--:--     0
100  185M  100  185M    0     0   871k      0  0:03:38  0:03:38 --:--:--  962k
==> Running installer for java7; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
==> installer: Package name is JDK 7 Update 72
==> installer: Installing at base path /
==> installer:PHASE:Preparing for installation…
==> installer:PHASE:Preparing the disk…
==> installer:PHASE:Preparing JDK 7 Update 72…
==> installer:PHASE:Waiting for other installations to complete…
==> installer:PHASE:Configuring the installation…
==> installer:STATUS:
==> installer:%4.512333
==> installer:PHASE:Writing files…
==> installer:%9.807284
==> installer:PHASE:Writing files…
==> installer:%21.843285
==> installer:PHASE:Writing files…
==> installer:%28.529953
==> installer:PHASE:Writing files…
==> installer:%33.879287
==> installer:PHASE:Writing files…
==> installer:%40.565954
==> installer:PHASE:Writing files…
==> installer:%45.915288
==> installer:PHASE:Writing files…
==> installer:%49.927289
==> installer:PHASE:Writing files…
==> installer:%59.288623
==> installer:PHASE:Writing files…
==> installer:%72.702201
==> installer:PHASE:Running package scripts…
==> installer:%90.414965
==> installer:PHASE:Running package scripts…
==> installer:%92.824888
==> installer:PHASE:Writing package receipts…
==> installer:PHASE:Validating packages…
==> installer:%97.750000
==> installer:STATUS:Running installer actions…
==> installer:STATUS:
==> installer:PHASE:Finishing the Installation…
==> installer:STATUS:
==> installer:%100.000000
==> installer:PHASE:The software was successfully installed.
==> installer: The install was successful.
🍺  java7 staged at '/opt/homebrew-cask/Caskroom/java7/1.7.0_72' (5 files, 186M)
Kernel.exit

@toonetown
Copy link
Contributor Author

Closing this issue - Oracle issued an update (1.7.0_56 was the one that was having problems)

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants