可执行jar无法正常启动 [英] Executable jar doesn't start normally

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

问题描述

我用eclipse indigo创建了一个可执行的jar文件,但是当我双击它时没有任何反应。但是当我将java -jar c:/dir/filename.jar写入cmd时,它可以工作。其他罐子运行良好。我正在使用jdk 1.7.0_02和eclipse indigo。我怎么能正常启动?

I created an executable jar file with eclipse indigo, but when i double click on it nothing happens. But when i write java -jar c:/dir/filename.jar to cmd, it works. Other jars runs well. I'm using jdk 1.7.0_02 and eclipse indigo. How could i start it normally?

推荐答案

你可以通过双击运行一个jar,你只需要确保Java与.jar文件相关联。最简单的方法是重新安装JRE(通常会为你完成)。

You can run a jar by double clicking it, you just have to make sure that Java is associated with .jar files. The easiest way to do this is by reinstalling the JRE (which generally does it for you).

否则你需要修改一些Windows属性(我是不确定您运行的是哪个版本的Windows)将.jar文件指向javaw.exe的实例。

Otherwise you will need to modify some of your Windows properties (I'm not sure what version of Windows you are running) to point .jar files to the instance of javaw.exe.

这是一个关于如何操作的Windows 7页面的链接

这篇关于可执行jar无法正常启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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