一个jar文件的MacOS可执行文件 [英] MacOS executable of a jar file

查看:417
本文介绍了一个jar文件的MacOS可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个独立的java应用程序,将在macintosh系统中使用,我不想将应用程序作为jar文件提供,因为它的源代码可以被解编译。因此,我的目的是将jar文件转换为可在MacOS中运行的某种可执行文件。有没有办法实现这个目标?我知道Launch4J生成一个jar文件的Windows可执行文件。我需要的是一个在MacOS中实现此功能的工具。 Thnaks。

I have a stand alone java application that will be used in a macintosh system and I don't want to deliver the application as a jar file considering that its source code can be de-compiled. So, my intention is to convert the jar file into some sort of executable that can be run in MacOS. Is there any way to achieve this? I know that Launch4J generates the windows executable of a jar file. What I need is such a tool that enables this in MacOS. Thnaks.

推荐答案

Apple已经取消了在Xcode中创建Java应用程序的能力,因为他们试图让开发人员专门使用Cocoa。你可能会得到一个旧版本的Xcode。

Apple has removed the ability to create Java applications in Xcode as they are trying to have developers use Cocoa exclusively. You could potentially get an old version of Xcode though.

如果你对 Launch4J ,它看起来也会为Mac OS X的Java程序创建一个本机包装器。因此,如果您对此感到满意,我只需使用Launch4J。

If you're interested in Launch4J, it looks like that will create a native wrapper for your Java program for Mac OS X as well. So if you're comfortable with that, I'd just use Launch4J.

请注意,Launch4J需要对Lion(10.7)及更高版本进行一些调整: http://code.google.com/p/gradle-launch4j/wiki/MacOSXLion

Note that Launch4J needs some tweaks for Lion (10.7) and beyond: http://code.google.com/p/gradle-launch4j/wiki/MacOSXLion

这篇关于一个jar文件的MacOS可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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