Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

jar file is not running, shows error: could not find main class

Hmm, interesting. What platform are you running on? It ran on all of my systems, so it should definitely have a main class. Which JRE version are you running?

java 1.8, Windows 10

also windows file explorer treated it as a zip file, ie. it gave a zip file icon and it just opens the file when I double it. But I have other jars, which gets correct icon and works correctly.

Very strange, because it was developed with JavaFX 8 on Windows 10, and on my system, the JAR file gets correctly launched by Java as an executable. I also know several other people have been able to successfully run it across several platforms. I did build it with the latest JDK 8 (update 162 if I remember correctly), so maybe you have an older version than that? JAR files are technically just ZIP archives if I remember correctly, so although the extension should be associated with Java, I wouldn't worry about that too much, as it may just be some system setting.


I would start by updating your Java if possible. However, I do recommend the installers if you're having trouble. I created them specifically for instances like this, because they package the correct JRE with them, so there should be no need to worry about compatibility. I know many people don't trust random indie game installers, but in this case, it is providing a convenience over the JAR file itself.