-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Java8 not working anymore #7253
Comments
Possible fix: use a public mirror of the old downloadable binaries Edit: I could fix it locally by linking to a local version of the JDK that I had downloaded previously. |
I believe it would be an unauthorized distribution. Oracle is pushing to deprecate older versions of Java SE with EOL for 8 in the coming year. They moved to shorter cycles beginning with 9 and the LT release is 11. However, now the Oracle distributions are commercial and for subscribers with support. You have to accept a personal licensing agreement which requires a personally created account. I believe they're pushing for those non-subscribers to use OpenJDK, which the community support for that distribution is limited to the latest release cycles back to LT 11. OpenJDK is not patching versions prior to 11. Oracle had forewarned that all of the older versions were EOL by the coming year and that 11+ were for subscribers. Any other non-subscribers were referenced to OpenJDK. However, OpenJDK has stated that they would only provide support to include patches for 11+. I've had a couple of developers in other projects scoff at me this past year about migrating to support of newer versions. Granted, I knew very little about java in comparison to them. But, it didn't take knowing the language to understand that once EOL for those distributions commercially and their open source counterpart aren't supporting versions older than 11, then your user base of testers, users, and other developers will probably decline. I wouldn't believe that the majority of the code being migrated to 11 is incompatible. Either way, this cask would have to reference a distribution which is public and authorized for distribution by a third party. As of now, Oracle for 8 is a no and OpenJDK are non-patched since their last support of it. |
The workaround is that you manually download the JDK from Oracle's website Once downloaded start a local HTTP Server for the file. I did the following on my Mac machine
Next edit Change the following lines: If you get a SHA-256 checksum error then you can verify the file you downloaded by running the command Run
|
Unfortunately no regular user knows that workaround. I'd suggest to modify the script to display a "how-to-download" text and let the user put the binary on a certain location to continue (and fail unless the downloaded file is there). |
However, I don’t remember Oracle ever announcing that they intended to put Oracle JDK 8 behind a registration wall any time before December 2020.
Just to avoid misunderstandings: that’s what Oracle said, not OpenJDK. A few companies other than Oracle keep maintaining, producing and supporting several OpenJDK variants well below 11.
See above; several companies do offer free, public support for OpenJDK all the way down to OpenJDK 1.8. Oracle also still maintains and patches their own (non-public) Java 8 fork, and still offers binary builds, which they call Oracle JDK 8 and which are subject to their license agreements.
Last time we checked, we found more than 70 formulas in homebrew-core which would not even work with OpenJDK 9+.
I agree. Right now I’m looking into @imranzahid01’s findings and how they may help save the |
@imranzahid01 Thank you for suggesting that workaround. It may work well enough as a stop-gap. I hoped that workaround would also help save the cask for everyone. (Your comment never implied that but hey, I hoped nevertheless!) However, I’ve just realized that it may degrade UX too much for most users. As a side note: your workaround may not need the HTTP server if you use a known |
tl;dr Let’s delete the After looking into the issue, I suggest to apply the following fixes, most critical listed first:
@Homebrew/cask maintainers: what are your opinions/preferred choices regarding step 2? Mine is AdoptOpenJDK; it works just fine, and we already carry a few of their builds. AdoptOpenJDK has committed to supporting Java 8 until September 2023. Also pinging @karianna, who knows a lot more about Java than I do. |
I would recommend that you now fetch your Java from the AdoptOpenJDK cask: https://github.com/AdoptOpenJDK/homebrew-openjdk |
Please note that users will need to pay Oracle (behind a registration wall) if they want the latest Oracle Java 8 (which is at version 8u212). It is a valid choice but as mentioned below there are multiple OpenJDK providers providing a free OpenJDK 8 (which is at version 8u212 and contains the same patches as Oracle except for one which came in late). The https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244 is a vendor-neutral doc explaining the options.
The https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244 is a vendor-neutral doc explaining the options.
Hope I helped :-), happy to keep answering questions |
My preference would be to nuke Java out of existence and from everyone’s collective memory. It’s truly the language from hell, and its overlords are finicky. Never has a (collection of) cask(s) given us so many headaches, and they’re the most popular. It’s like a sick joke. Java is the tenth circle that Dante deemed too terrifying to write about.
It’s worth noting that over the two next comments, it was argued that the OpenJDK builds are essentially the same (confirmed by Oracle) with different licenses. We use those for the after-8 Java casks, but they don’t provide a version for 8.
I’m fine with that choice and the points above. I’m also fine with bringing back any and all AdoptOpenJDK cask you see fit for the cask-java effort. |
Truer words have never been spoken. 👌
I'm also fine with that. |
I wholeheartedly approve of this matter. |
Also, I think Homebrew/homebrew-cask#16383 has just acquired even more relevance. |
@claui The "solution" was to delete the cask? IMO that will break lot of stuff with unclear cause. Replacing it with something that prints a clear statement would probably have been the better way... I guess we can close the issue now. |
@micw Users are free to install/upgrade Java 8 from Oracle’s website manually. What did I miss? |
User experience (getting some technical error message rather than a "please use openjdk8 or install java manually" message). |
@micw As stated in #7253 (comment), I’m currently finishing up a fix for the caveat directly in homebrew-core. This is the current draft of what the caveat will say:
|
@claui obviously I got that "Delete java8.rb" -- or it consequences -- wrong... Looks like a good solution for dependencies. |
Thanks @micw for your feedback (and for filing the issue in the first place). Closing now in favour of Homebrew/brew#6035. |
Just because it wasn't mentioned didn't negate that it can't be done. The cask java8 is in reference to the Oracle distribution. So, it would need to be pulled or referenced to the OpenJDK. I am aware that the two Oracle and OpenJDK are maintained and distributed differently. I was just commenting to help save someone the headache of hosting the Oracle distribution, providing it through this cask, and then it being pulled because of it being unauthorized. Oracle could do the same for version 12 but they chose not to, maybe because it's the latest version. Why require it for older distributions? Either way, I switched over to AdoptOpenJDK. |
Thanks @robertleeblairjr. Your input helped establish that the cask needed to be abandoned. That’s much appreciated. I apologize if my comment seemed overly nitpicky. Its purpose was to make extra sure I understand everything correctly before we proceed. |
No worries. I didn't take offense. I find this constant changing of Oracle's licensing as annoying as many other people. Take care and have a nice day. |
The java8 cask has been removed. See Homebrew/homebrew-cask-versions#7253.
Java8 cask has been deleted. See discussion at Homebrew/homebrew-cask-versions#7253
Java8 cask has been deleted. See discussion at Homebrew/homebrew-cask-versions#7253
General troubleshooting steps
--force
.brew update-reset && brew update
and retried my command.brew doctor
, fixed as many issues as possible and retried my command.Description of issue
Oracle Java is no longer available for public download (license change). The last fix (#6934) does not work anymore.
Edit: License changed at April 16, 2019 - see https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html for details
Command that failed
Output of command with
--force --verbose --debug
The text was updated successfully, but these errors were encountered: