什么原因导致“无法访问 jarfile"?错误? [英] What causes "Unable to access jarfile" error?
本文介绍了什么原因导致“无法访问 jarfile"?错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在不使用 IDE 的情况下执行我的程序.我创建了一个 jar 文件和一个可执行的 jar 文件.什么时候我双击 exe jar 文件,没有任何反应,当我尝试在 cmd 中使用该命令时,它给了我这个:
I want to execute my program without using an IDE. I've created a jar file and an exectuable jar file. When I double click the exe jar file, nothing happens, and when I try to use the command in cmd it gives me this:
Error: Unable to access jarfile <path>
我使用命令:java -jar Calculator.jar
我是如何创建 jar 的:
How I created the jar:
- 右键单击项目文件夹(计算器)
- 选择
- 点击Java文件夹并选择可执行Jar文件",然后选择下一步
- 启动配置:主要 - 计算器
- 创建导出目的地
- 点击完成"并获利!嗯,不是真的.
推荐答案
已修复
我只是将它放在不同的文件夹中,它起作用了.
I just placed it in a different folder and it worked.
这篇关于什么原因导致“无法访问 jarfile"?错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文