从创建一个可运行的jar .EXE一个窗口(preferably在Linux上) [英] Creating a windows .exe from a runnable jar (preferably on linux)

查看:99
本文介绍了从创建一个可运行的jar .EXE一个窗口(preferably在Linux上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经打包成一个xyz.jar的应用程序,它可以与Java -Xmx2g -jar xyz.jar

I have an application packaged up as a xyz.jar, which can be run as java -Xmx2g -jar xyz.jar

我怎样才能将其转换为一个独立的exe文件,可以通过Windows用户下载并使用一个单一的点击启动? preferably,我想了JRE还捆绑exe文件里面,很像从MAC来完成:的http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html

How can I convert this to a self-contained exe that can be downloaded by Windows users and launched with a single click? Preferably, I'd like the jre also bundled inside the exe, much like can be done from the mac: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html

哦,还有我preFER,如果我能做到这一点,从一个Ant构建文件(或Eclipse插件)在Mac或Linux平台的,因为我没有方便地访问到Windows(虽然我的用户做)。这可能吗?
谢谢你。

Oh, and also I'd prefer if I can do this from an ant build file (or eclipse plugin) on a mac or linux platform, since I don't have easy access to Windows (though my users do). Is this possible? Thanks.

推荐答案

看看Launch4J,它是跨平台的,所以你应该能够生成您的构建正在运行的任何平台上的可执行文件。 IIRC它也有一个Ant任务就可以使用了。

Take a look at Launch4J, it's cross platform so you should be able to generate the executable from any platform your build is running on. IIRC it also have an ANT task ready to be used.

http://launch4j.sourceforge.net/

这篇关于从创建一个可运行的jar .EXE一个窗口(preferably在Linux上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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