In my application I am trying to make it run on startup but for what ever reason it wont add to the registry. I've done this manually from the command prompt and it worked fine I've also tried running it as an administrator with no luck and I am not getting any error messages. Heres my code:
public static void windowsStartUp() { try { String s = System.getProperty("file.separator"); String data = "javaw -jar " + Mmrgh.config.dir + s +"Mmrgh" + Mmrgh.config.VERSION + ".jar"; Runtime.getRuntime() .exec("reg add HKLM" + s + "Software" + s + "Microsoft" + s + "Windows" + s + "CurrentVersion" + s + "Run" + s + " /v Test /t REG_SZ /d \"" + data + "\" /f"); } catch (IOException e) { if (Mmrgh.config.DEBUG_MODE) e.printStackTrace(); } }