0

So I have a .jar from https://github.com/00-Evan/shattered-pixel-dungeon/releases, and when I double-click the .jar file, nothing happens.

Even opening the .jar file by choosing /Program Files/Java/jre1.8.0_271/bin/javaw.exe, which by all means should work, doesn't.

I have the latest Java Runtime downloaded from https://java.com/en/download/, and I know it works because https://github.com/jindrapetrik/jpexs-decompiler/releases depends on it, and it runs just fine. Why?

Regards, radzo73

More info: I know that the .jar file worked fine on my PC in the past (and works fine even on my Mac), so either the file associations are messed up, or Java itself got messed up somehow. Both the 63-bit and 32-bit versions (1.8.0_271) don't work for me.

More more in for for anyone that will ever see it: Uninstalling and reinstalling Java doesn't help, opening javaw.exe with my .jar file doesn't work, and the Registry paths are correct. Running the file via java -jar file.jar command works fine, but double-clicking/Open With... doesn't.

  • Does this answer your question? [How to make an executable JAR file?](https://stackoverflow.com/questions/5258159/how-to-make-an-executable-jar-file) – Rob Evans Nov 01 '20 at 15:35
  • 1
    If `javaw` doesn't work, then there's probably something wrong with the Jar file you downloaded. Talk to the person who created it. When you install Java, it should set up a Windows association that allows you to double click on a Jar file (mine did). It should just work, maybe find a different Jar file and test with that. – markspace Nov 01 '20 at 15:37
  • @RobEvans No, he's talking about file associations, not native executable. – markspace Nov 01 '20 at 15:38
  • its the difference between a regular (library) jar and an executable jar. They're put together differently. If the jar he expects isn't executing/opening as expected... its probably a lib not an executable jar. The manifest would need to specify the main/entry class otherwise.. unless I'm mistaken and didn't understand the question. This question has been asked/answered 1000 times over – Rob Evans Nov 01 '20 at 15:41
  • @RobEvans It's likely just a bug in the downloaded program, which means it's about a "library" and not suitable for SO. But it could also be that he has his file associations not set correctly, which we can help with. Let's wait for some more info. – markspace Nov 01 '20 at 15:45
  • More info: I know that the .jar file worked fine on my PC in the past (and works fine even on my Mac), so either the file associations are messed up, or Java itself got messed up somehow. Both the 63-bit and 32-bit versions don't work for me. – Conrad Falloff Nov 01 '20 at 15:54
  • 1
    You might rename the.jar to.zip, extract it and check the manifest.mf file regarding its main-class (if present). Also the jar content might be corrupted. Plus, test the jar from command line by executing: java -jar – Aydin K. Nov 01 '20 at 15:59

0 Answers0