Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More effective install-time workaround for Java #2823

Merged
merged 1 commit into from
Feb 10, 2014
Merged

More effective install-time workaround for Java #2823

merged 1 commit into from
Feb 10, 2014

Conversation

zwaldowski
Copy link
Contributor

Use PlistBuddy and some ln jiggery-pokery to make JDK 7 the bulletproof default JDK on supported versions of OS X. Not dead-set on this getting merged, but it certainly makes my life easier - following installation of this modified Cask, subsequent installation of android-studio, appcode, eclipse-ire are tested to work immediately with potentially no Info.plist sed-ing.

@rolandwalker
Copy link
Contributor

Wow, thanks for this -- I applaud your hacktitude here!

Some quibbles:

  • no need for the VERSION constant. We recently made it so that self is the cask instance when inside blocks such as after_install. That means you can leave the version stanza as-is, and invoke the version method within the after_install block. In short, "#{version}" should interpolate to the string you want.
  • no need for after_uninstall stanza. Just append another key/value pair to uninstall:
uninstall :pkgutil => 'com.oracle.jdk7u51',
          :files => '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'

@zwaldowski
Copy link
Contributor Author

I've addressed those issues, @rolandwalker, thanks!

@rolandwalker
Copy link
Contributor

Could you also be so kind as to squash this awesomeness into one commit?

* Use `ln` and `PlistBuddy` to establish JDK 7 as the system Java
* Use current Java version for linking current JDK
* Properly clean up after uninstall
@zwaldowski
Copy link
Contributor Author

Done.

@rolandwalker
Copy link
Contributor

Great, thanks!

I'm going to leave this PR open for a while before merging so people have a chance to admire it.

@rolandwalker rolandwalker self-assigned this Feb 8, 2014
rolandwalker added a commit that referenced this pull request Feb 10, 2014
More effective install-time workaround for Java
@rolandwalker rolandwalker merged commit 68599b4 into Homebrew:master Feb 10, 2014
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 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

Successfully merging this pull request may close these issues.

2 participants