如何为java swing程序创建exe文件或jar文件 [英] How to create exe file or jar file for java swing program

查看:79
本文介绍了如何为java swing程序创建exe文件或jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在java swing中有计算器代码。

现在我的问题是如何将它转换为exe文件或jar文件。

我尝试使用exe4j软件。但是一旦我完成了exe文件。如果我试图打开它显示一些错误。

所以请帮助我。

解决方案

使用Netbeans导出可运行的Jar [ ^ ]



在Eclipse中导出一个可运行的jar [ ^ ](好的网站,还可以查看剩下的!)





之后你可以使用java -jar命令调用jar。WhatEverYouNameIt.jar

你也可以添加一个ini文件或其他东西。你可以设置一个快捷方式来覆盖命令并给它一个漂亮的图标。


我得到了上述问题的解决方案


看看进入这个链接,你会得到解决方案...



http://javapapers.com/core-java/executable-java-jar-file-and-windows-exe-file-creation/

i have code for calculator in java swing.
Now my question is how convert it in to exe file or jar file.
i tried with exe4j software. but once i done with exe file. if i try to open it showing some error.
So please help me in this.

解决方案

Exporting a runnable Jar with Netbeans[^]

Exporting a runnable jar in Eclipse [^] (good website, check also the rest!)


After that you can call the jar with the command java -jar WhatEverYouNameIt.jar
You can also add an ini-file or other things. You can set up a shortcut to cover the command and to give it a nice icon.


Ya i got the solution for the above problem


Look into this link u'll get solution...

http://javapapers.com/core-java/executable-java-jar-file-and-windows-exe-file-creation/


这篇关于如何为java swing程序创建exe文件或jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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