将.jar转换为OSX可执行文件? [英] Convert .jar to an OSX executable?

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

问题描述

我创建了一个Java应用程序,我想在Windows,OSX和Linux上分发而不分发jar文件。我使用了很棒的Windows exe包装器 http://launch4j.sourceforge.net/ 来创建一个完整的.exe文件用我的图标不会吓到Windows用户。

I made a Java application which I would like to distribute on Windows, OSX and Linux without distributing a jar file. I used the great Windows exe wrapper http://launch4j.sourceforge.net/ to create an .exe file complete with my icon that won't scare Windows users.

是否有类似的包装器我可以用于OSX / Unix?一个重要的考虑因素是我想在可执行文件上有自己的图标(特别是对于mac用户)。

Are there similar wrappers that I can use for OSX/Unix? An important consideration is that I would like to have my own icon on the executable (especially for mac users).

谢谢!

推荐答案

是的,在Mac OS X上有一个名为 Jar Bundler (假设您已经拥有Mac OS的副本) X) Xcode开发人员工具,允许您在本机Mac中捆绑JAR文件OS X* .app应用程序包与其他应用程序一样,带有漂亮闪亮的图标。

Yes, on Mac OS X there is a program called Jar Bundler that is installed when you install the free (assuming that you already own a copy of Mac OS X) Xcode Developer Tools that allows you to bundle a JAR file inside a native Mac OS X "*.app" application bundle with a nice and shiny icon just like other apps.

更新

在OS X的更高版本中不存在JAR捆绑器。作为解决方法,您可以手动创建调用Java的OS X项目。或者,有各种类似的构建系统扩展;例如,Gradle的 gradle-macappbundle 插件将创建这样一个包装器应用程序。

Update
The JAR bundler doesn't exist on later versions of OS X. As a workaround, you can manually create an OS X project that invokes Java. Or, there are a variety of build system extensions that do a similar thing; for example, the gradle-macappbundle plugin for Gradle will create such a wrapper app.

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

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