I have a launcher I'm creating as a mini side project and I'm trying to execute a jar file. I figured out how to execute a exe. Heres the code:
mineshaft.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String mhome = System.getProperty("user.home") + ""; try { Runtime.getRuntime().exec("java -jar .mhome+ \\AppData\\Roaming\\.minecraft\\minecraft.exe"); } catch (Exception a) { } } }); Ive searched everywhere, and everyone says this code works, but it won't for me. Any suggestions?
minecraft.exeactually a jar file? Typically executable jar files have a .jar extension.