适用于Apple M1芯片的Java/JDK? [英] Java/JDK for Apple M1 chip?

查看:2027
本文介绍了适用于Apple M1芯片的Java/JDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否需要特殊版本的OpenJDK来支持新的Apple M1芯片?

Will there need to be a special release of OpenJDK to support the new Apple M1 chip?

我看到当前有用于macOS/OS X的JDK下载,但这些下载似乎仅适用于x86处理器.那是对的吗?如果是这样,我在哪里可以下载M1的OpenJDK版本?

I see that there are currently downloads of the JDK for macOS/OS X, but these seem to only be for x86 processors. Is that correct? If so, where can I download a version of OpenJDK for the M1?

推荐答案

是.

在此页面上:采用OpenJDK最新版本,您可以从操作系统"下拉菜单中选择"macOS",然后从体系结构"开始,当前只有x64,但很快应该会有AArch64或ARM64(这些通常是64位ARM的简码).毫无疑问,由于苹果无疑在其M1设计中内置了许多扩展,因此苹果拥有了自己的产品.

On this page: AdoptOpenJDK Latest Releases you can select 'macOS' from the 'Operating System' dropdown, and then from 'Architecture', it's currently only x64, but soonish there should be AArch64 or ARM64 (those are usually the shortcodes for 64-bit ARM). Possibly, as apple no doubt has a bunch of extensions built into their M1 designs, apple gets its own.

如果您将Operating System保留在"any"上,则会注意到aarch64在其中,这使您可以使用适用于ARM处理器的linux版本.那(可能)不会在M1硬件上的MacOS上运行,但这已经完成了95%的工作.

If you instead leave Operation System on 'any', you'll note aarch64 is in there, and this gets you to a linux release for ARM processors. That (probably) won't run on MacOS on M1 hardware, but that's 95% of the work already done.

所以:它还不存在,但是请注意,ARM的JDK已有十多年的历史了,尽管JDK15放弃了对许多奇特的OS/arch组合(例如solaris)的支持,但ARM开发人员至少一直保持至少部分相关(即使到目前为止,它主要是Oracle商业许可证产品).就是说:创建一个本地运行在M1上的acceptopenopenjdk发布不是费力的工作,因此大概会发生.但是,这是开放源代码的工作,因此,如果您急于想必,请阅读并做一下贡献:)

So: It's not there yet, but note that JDKs for ARM have been available for decade+, and whilst JDK15 has dropped support for a bunch of exotic OS/arch combos (such as solaris), ARM dev has always remained at least partially relevant (even if so far it's mostly an oracle commercial license offering). That is to say: It should not be a herculean effort to create an adoptopenjdk release that runs on M1s natively, so presumably, it will happen. But, it's open source effort, so if you're anxious, by all means, read up and contribute :)

直到2020年11月10日,苹果公司都没有提供有关此体系结构的任何细节,除非您为此购买了devkit盒(一个装有A14芯片的苹果mini,它不是M1芯片,但我猜它足够接近),并签署了一个大型的保密协议.

Apple has not given any details on this architecture whatsoever until november 10th 2020, unless you bought a devkit box for it (an apple mini with an A14 chip, which isn't an M1 chip, but close enough I guess), and signed a big NDA.

通常,如果您绕开NDA,开源项目将以相反的方向尽可能快地运行,因此,如果您不喜欢这种情况,我认为抱怨采用openjdk或其他打包程序并不明智.和有关它的开源项目:)

As a rule, open source projects will run as fast as possible in the opposite direction if you wave an NDA around, so if you dislike this state of affairs, I don't think it's wise to complain to adoptopenjdk or other packagers and open source projects about it :)

幸运的是,现在它已经退出了,不再需要NDA.我的假设是,一旦熟悉openjdk源代码的人使用基于M1的macos系统对其进行测试,就可以相当容易地组合OpenJDK源代码的ARM分支+ macos-x64版本已经存在的macos位.这应该意味着一个月内应该在这里发布一个optaopenopenjdk macos-aarch64版本.

Fortunately, now it's out, and an NDA is no longer required. My assumption is that the ARM branch of the OpenJDK sourcecode + the macos bits that already exist for the macos-x64 release can be combined rather easily once someone with some familiarity with the openjdk sourcecode has an M1-based macos system to test it on, which should mean an adoptopenjdk macos-aarch64 release should be here within the month.

但是,开源.您没有付钱给他们,您没有合同,他们也没有欠您钱.如果您希望速度更快,则可以做出贡献或捐赠请求.

But, open source. You didn't pay them, you have no contract, and they don't owe it to you. Donate to the effort or contribute a pull request if you want it to go faster.

更新:

  • Azul的M1 OpenJDK构建
  • Microsoft(是的,确实) github源repo ,以便在AArch64上为MacOS进行早期访问的OpenJDK16构建.请注意,微软已经在AArch64的openjdk分支(基于ARM的Windows 10)上工作了一段时间,这可以追溯到:许多艰苦的工作已经完成.
  • Azul's M1 OpenJDK builds
  • Microsoft's (yes, really) github source repo for an early access OpenJDK16 build for MacOS on AArch64. Note that microsoft's been working on the openjdk branch of AArch64 (for ARM-based windows 10) for a while, which goes back to: A lot of the hard work was already done.

这篇关于适用于Apple M1芯片的Java/JDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆