如何使用快捷方式运行像我一样的典型程序的Java应用程序? [英] How do I run a java application like I would a typical program, using a shortcut?

查看:101
本文介绍了如何使用快捷方式运行像我一样的典型程序的Java应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用IDE编写Java应用程序并对其进行测试。在IDE中,我可以运行应用程序并查看它是如何工作的。但是,如何使用快捷方式或jar文件运行应用程序?
例如,为了运行我的WAMP服务器,我在WAMP目录中运行wamp.exe文件。所以,我正在运行一个启动整个程序的文件。如何使用Java应用程序实现此类操作?我听说过使用jar文件,但我不确定这是否是正确的方法。

I'm currently using an IDE for writing a java application and testing it. In the IDE, I can run the application and see how it works. However, how would I run the application using a shortcut, or a jar file? For example, in order to run my WAMP server, I run the wamp.exe file in the WAMP directory. So, I'm running a single file which launches the entire program. How do I achieve this sort of thing with a java application? I've heard about using a jar file, but I'm unsure about whether that would be the proper way to do this or not.

推荐答案

这取决于您使用的IDE。以eclipse为例,打开文件选项卡,选择export,在树中打开java,然后选择runnable jar文件。然后填写界面,你的好去。

It depends on the IDE you are using. With eclipse for example, you open up the file tab, select export, open java in the tree, and select runnable jar file. Then fill the interface out and your good to go.

这篇关于如何使用快捷方式运行像我一样的典型程序的Java应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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