When double clicking a .jar file a cmd window opens briefly and then disappears, but the .jar file isn't executed
11,561
.jar
s are not executable files. To execute a jar, open a terminal (by Start -> Run - > type cmd
(ENTER) -> cd <path-where-jar-is>
) and run:
java -jar <filename.jar>
No jar can execute (in Windows) by double clicking. If you want to achieve the "double clicking" effect, you will need to create a .bat
or .cmd
file (that is executable).
Author by
user1068367
Updated on September 18, 2022Comments
-
user1068367 almost 2 years
I am looking for a solution to the problem posed in the title. When I double click a .jar file, or right click and open, it simply opens a black cmd window for a split second, then closes it, and nothing else happens. I know that the programs do not run, as a few that I have tried are installers, yet the program they are meant to install are nowhere to be found. Is there a way to fix this so that the files actually function?
-
Mathew Lionnet almost 5 yearsNormally the JAR extension is registered to be executed.
-
DeemV almost 5 yearsKeep in mind that jar extensions and files are userd to deliver malicious payloads...so, there is a slight possibility jar files are blocked by means of corporate secur policy, antivirus etc.