Running JAR file on Windows 10 [duplicate]
Asked Answered
M

1

10

I have made a Jar file, but I cant make it to run by double clicking.
It works fine using java -jar name.jar or by making a batch file.
I have already reinstalled jdk1.8.0_102, set the JAVA_HOME variable and javaw.exe in the jre folder is already the default program to run it.
so how do I make it to run by double clicking?

Menarche answered 11/10, 2016 at 7:42 Comment(5)
This question has already been answered, try look here: #8511563Longevity
@Longevity I did read those, none of them worked for me.Menarche
This answer is the answer.Enviable
I downloaded a .jar file that I couldn't open. What worked for me was to download the latest version of Java: java.com/en, just in case other people in the same situation as me came to this questionSwanskin
you may have different versions of JDK installed in your computer. In that case take a look at this solution:https://mcmap.net/q/236133/-how-to-run-jar-file-by-double-click-on-windows-7-64-bitFlavine
B
20

How do I run an executable JAR file? If you have a jar file called Example.jar, follow these rules:

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.
Bawl answered 17/9, 2017 at 2:6 Comment(1)
Amazing! You are a life saver!Discompose

© 2022 - 2024 — McMap. All rights reserved.