在Mac OS X上捆绑私有JRE [英] Bundling a private JRE on Mac OS X

查看:89
本文介绍了在Mac OS X上捆绑私有JRE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从下一版本的Mac OS X开始,Java将不再包含在系统中,我不想强​​迫我的客户自行安装。所以我想做我在Windows上做的事情 - 用我的应用程序捆绑它。它还给了我一些希望,它可以包含在Mac App Store中。

Starting with the next version of Mac OS X, Java will no longer be included in the system and I don't want to force my customers to install it themselves. So I would like to do what I do on Windows - bundle it with my app. It also gives me some hope that it could get included in the Mac App Store.

我在哪里可以下载我的应用程序中可以包含的Mac OS X JRE?或者我可以复制我Mac上安装的那个吗?

Where can I download a Mac OS X JRE that I could include with my application? Or can I just copy the one that's installed on my Mac?

推荐答案

更新(2013年4月15日):

正如Thorbjørn所指出的那样,Oracle现在有了解决方案。请参阅 http://docs.oracle.com/javase/ 7 /文档/技术说明/指南/ JWEB / packagingAppsForMac.html 。但是,我保留原始内容用于历史目的,因为这是一个有趣的研究项目。

As Thorbjørn helpfully pointed out, Oracle now has a solution for this. See http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html. However, I'm keeping the original content for "historical purposes", and because it was a fun research project.

以前的版本(带编辑):

这是一个很好的问题。我要回应的是,你只是超前于你的时间 - 正如你所指出的那样,在Lion发布之前,Java不会被删除。但是,这篇文章清楚地表明今天使用Java不是允许:

This is a great question. I was going to respond that you are simply ahead of your time -- as you pointed out, Java is not going to be removed until the Lion release. However, this article makes it clear that using Java today is not allowed:


使用已弃用或可选安装技术的应用程序(例如,Java,[需要PowerPC代码] Rosetta)将被拒绝。

Apps that use deprecated or optionally installed technologies (e.g., Java, [PowerPC code requiring] Rosetta) will be rejected.

与此同时,还没有人宣布Mac OS X的可再发行JRE。考虑到你正在开辟新局面,我认为你最好的选择是查看 Mac OS X端口维基页面。它确实描述了如何编译自己的JDK,但清楚地说明生成的JDK是否可以干净地捆绑。我想你必须尝试看看: - (。

At the same time, no one has announced a redistributable JRE for Mac OS X yet. I think your best bet, bearing in mind that you are forging new ground, is to check out the Mac OS X Port wiki page of the OpenJDK project. It does describe how to compile your own JDK, but it does not clearly state whether or not the resulting JDK can be "bundled" cleanly or not. I think you will have to try it and see :-(.

此外,目前还不清楚OpenJDK许可是否允许这一点(IANAL)。希望其他人有关于Linux / Windows已经考虑到了这一点,但当然苹果贡献的规则可能不同。

Also, it's not clear if the OpenJDK licensing allows this at all (IANAL). Hopefully someone else has already figured this out with regard to Linux/Windows, although of course the rules may be different for the Apple contributions.

希望这会有所帮助。如果没有别的,那就是一个开始点。

Hope this helps. If nothing else, it's a starting point.

编辑:我要再提出一个建议。我们现在知道可以为App Store打包单声道应用程序。此外, IKVM.NET 是一个完整的Java实现,运行在Mono之上。理论上,您可以尝试将这两个部分放在一起并获得捆绑的Java应用程序实际上的App Store需要一个JRE!

I am going to throw out one additional suggestion. We now know that Mono apps can be packaged for the App Store. Furthermore, IKVM.NET is a complete implementation of Java that runs on top of Mono. You could try, in theory, to put these two pieces together and get a Java app, bundled for the App Store, that does not in fact require a JRE!

如果你试试这个,我很想知道它是如何工作的: - )。

If you try this, I would love to hear how it works out :-).

编辑2:不幸的是,App Store和GPL似乎不兼容(参见 http://www.zdnet.com/blog/open-source/no-gpl-apps-for-apples-app-存储/ 8046 )。 OpenJDK许可证与GPL完全相同,但它非常接近(再次,IANAL)。因此,Mono& IKVM.NET可能是您最好的选择。祝你好运!

EDIT 2: Unfortunately, the App Store and the GPL do not appear to be compatible (see http://www.zdnet.com/blog/open-source/no-gpl-apps-for-apples-app-store/8046). The OpenJDK license isn't exactly the same as the GPL, but it's pretty close (again, IANAL). Therefore, Mono & IKVM.NET may be your best bet. Good luck!

这篇关于在Mac OS X上捆绑私有JRE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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