【问题标题】:Running JAR file on Windows 10 [duplicate]在 Windows 10 上运行 JAR 文件 [重复]
【发布时间】:2017-02-19 17:09:48
【问题描述】:

我制作了一个 Jar 文件,但我无法通过双击使其运行。
使用java -jar name.jar 或制作批处理文件可以正常工作。
我已经重装了jdk1.8.0_102,设置了JAVA_HOME变量,jre文件夹中的javaw.exe已经是默认运行的程序了。
那么如何让它通过双击运行呢?

【问题讨论】:

标签: java jar executable-jar


【解决方案1】:

如何运行可执行的 JAR 文件? 如果您有一个名为 Example.jar 的 jar 文件,请遵循以下规则:

Open a notepad.exe.
Write : java -jar Example.jar.
Save it with the extension .bat.
Copy it to the directory which has the .jar file.
Double click it to run your .jar file.

【讨论】:

  • 太棒了!你是一个救生员!
猜你喜欢
  • 2010-09-28
  • 2020-08-27
  • 2020-02-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-14
  • 1970-01-01
  • 2010-12-04
相关资源
最近更新 更多