


Program will exit.Ĭ:\Users\Tim\Desktop>java -jar launcher.Below is a table showing the default directory for. : launcher.jarĪt $1.run(Unknown Source)Īt (Native Method)Īt (Unknown Source)Īt (Unknown Source)Īt $AppClassLoader.loadClass(Unknown Source)Ĭould not find the main class: launcher.jar. Here is a reproduction of what I think you see:Įxception in thread "main" : launcher/jar Caused by: Update: After thinking about it a little more, based on the output above and comments below, my guess is that you are trying to run the jar using the 'java' command from the command line. While exporting from eclipse, an option is to select a run configuration (from a previous test run for instance) and eclipse uses that info to populate the manifest. Runnable JARs need a Manifest that indicates the main class to use. tProperty("", System.getProperty("user.dir") + "natives") ĬlassLoader = URLClassLoader.newInstance(new URL) ĬlassLoader.loadClass("2").newInstance() Program will exit" (this is on the console, I want to be able to double click the JAR and have it launch) File file = new File(System.getProperty("user.dir") + "/lessur.jar") I'm currently trying to replicate the functionality, however, when I export as a runnable JAR in Eclipse, when I try launch it, it prints "Could not find main class launcher.jar.

The Minecraft launcher doesn't need any external Java libraries to run either. If it is not present on the system, it downloads it. Then, after logging in, the launcher then runs the main Minecraft core, minecraft.jar. When the launcher is started, it displays a login screen with news etc. The user can download a JAR (Or a JAR packaged into an EXE), which has absolutely no code for the Minecraft client at all. If you have never played Minecraft, then this is how the mechanics of the launcher work.
