I'm going to compile a project. I do like in this example below marked in red and the cmd says it compresses to a jar. The .jar ends up in the same folder as the mainclass and when I press the .jar file I just hear that "windows error-sound" and the .jar does not open.
jar cvf TicTacToe.jar TicTacToe.class audio images
The example marked in red is from here Creating a JAR File (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files) and I've read all that.