Originally Posted by
Aks3l
I wasn't around back then but i imagine they simply reverse engineered the runescape launcher to find that it is just an exe that is linked with the JVM libraries, and all it does is create a new JVM process and then loads the file called "JagexAppletViewer.jar" (found in the same directory as the launcher) into it, parsing a "config URL". Going to the URL in your browser will show you its literally just a config file that specifies things such as the language & where to find the game applet (the one that used to be displayed on browsers).
Reverse engineering the JagexAppletViewer.jar file they found that it simply downloads the config from the URL, from there it reads where it can download the java applet, which it then also downloads & loads into the JVM. It then simply creates a JFrame and embeds this applet into it and then calls the applets start function to run it like it would in a browser.
So with all that info, when they wanted to dump everything into a single executable jar file, they started by simply going the the URL specified by the config. Downloading the applet directly, which they then decompiled to java source code. This code wouldn't actually be runnable by itself, because it doesn't actually have a main method as its just an applet (its meant to be downloaded in a browser, which will then call its run method). Also it doesn't create any window by itself, because again, that's meant to be handled by the browser. To make it runnable they would simply add a new class with a main method that creates a JFrame and embeds the applet into it (just like jagex's JagexAppletViewer does).
To get an actual runnable jar file you just recompile everything and package it into a .jar.