什么原因导致“无法访问 jarfile"?错误?

编程入门 行业动态 更新时间:2024-10-09 10:28:56
本文介绍了什么原因导致“无法访问 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"?错误?

    本文发布于:2023-11-09 08:00:33,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1571811.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:无法访问   错误   原因   jarfile   quot

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!