JAR file opens and closes immediately

Solved
Meude Posted messages 3 Status Membre -  
KX Posted messages 19031 Status Modérateur -
Hello there!

Let’s admit it right away, I understand NOTHING about Java, so please, try to explain it to me like I'm an idiot, because in this area, that's what I am! :)

So, I recently downloaded a .Jar file; which opens with Java, I just spent 3 hours trying to open it, without success.

The file opens (you see the game's name on a small window in the middle of the screen), then it closes in a split second. I've tried a lot of things, looked everywhere, in both French and English, I tried through the command prompt, reinstalled Java, tried Jarfix, I received a cascade of error messages, often different from each other, lost all patience, yelled for no reason at my cat, and I think an ulcer is starting to show.. ^^

Thanks in advance for your help, and have a great day! :)

2 réponses

KX Posted messages 19031 Status Modérateur 3 020
 
Hello,

"Then it needs to be extracted as a Zip file."
No, as Meude understood, a Jar is a Java program and therefore it must be executed with Java. You can indeed open it like a zip, but that won't allow the program to run.

"The file opens (the name of the game appears in a small window in the middle of the screen), then closes in a split second."
You need to open it via a command prompt. This prevents the window from closing on its own and allows you to see what is written in it even after the program has finished (especially in case of an error).

The command to use is
java -jar drasa2Editor.jar


"your message made me think of the solution, which was as obvious as can be."
When you find the answer on your own, please mention it on the forum, as this allows others who may come across your discussion later to have the answer if they have the same problem as you.
--
Trust does not exclude control.
3