无法运行JAR文件 [英] Can't Run JAR Files

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

问题描述

我可以通过netbeans运行我的项目但是在我制作一个jar文件并双击它后我得到错误找不到Java运行时环境?我在Windows上。

I can run my project through netbeans but after I make a jar file and double click it I get the error cannot find Java runtime environment? I am on Windows.

推荐答案

您没有创建文件关联。右键单击Internet Explorer中的.jar文件,选择打开方式,然后导航到您的JRE。选择java.exe可执行文件,并确保命令行参数中包含-jar。

You don't have a file associate created. Right click on the .jar file in Internet Explorer, select Open With, and navigate to your JRE. Select the java.exe executable, and make sure the command-line argument has ' -jar ' present.

.jar文件将作为第一个参数传递给JVM。

The .jar file will be passed as the first argument to the JVM.

这篇关于无法运行JAR文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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