title: JAR hidden inside EXE?
body: <p><a href="http://www.minecraft.net/" rel="noreferrer">Minecraft</a>, a Java game, is free this weekend. The Windows version downloads as an exe file. I was curious what the EXE file is doing and where it's unpacking and running the actual game JAR from. So using a command, I found the command-line arguments to the running javaw.exe process; and oddly enough, it was launched with a classpath pointing to the executable! (meaning, the .exe file was acting as a jar). Indeed, after renaming Minecraft.exe to Minecraft.jar, I was able to open it and see the loader class files and such, as if it were a normal JAR file and not an EXE at all.</p>
  
  <p>How is this possible? And how can I do it with my own JAR files?</p>