Read up on Java archives (JAR). I think you can pretty much use something like WinZip and zip up the class files, then change the extension to .jar and it will work. But there’s one other bit, the manifest.mf file which tells the JAR loader what is the main class in that archive.
If you have the Java runtime installed on your computer, simply double clicking on the jar file will launch it up. However, that might not always be the case. What I’ve seen more commonly done with a “standalone” Java app - meaning you run it from the computer, not inside a web browser - is they create a shortcut (like any standard shortcut link in Windows) with the target set as:
java -jar mygame.jar
Replace “mygame.jar” with the actual JAR filename you made.
You can even put your graphics right inside the JAR file and use them from there. But if you remember earlier, JAR files can be opened and extracted using Winzip. So if you’re concerned about protecting your game assets, you might need to build in your own encryption mechanisms.