static void classicNohupJavaxWithChdir(String javaxargs) { classicNohupJavaxWithChdir(javaxargs, ""); } static void classicNohupJavaxWithChdir(String javaxargs, String vmArgs) ctex { int x = latestInstalledJavaX(); File xfile = new File(userHome(), ".javax/x" + Math.max(x, 30) + ".jar"); if (!xfile.isFile()) { String url = "http://tinybrain.de/x30.jar"; byte[] data = loadBinaryPage(url); if (data.length < 1000000) fail("Could not load " + url); saveBinaryFile(xfile.getPath(), data); } String jarPath = xfile.getPath(); if (javaxargs.startsWith("#")) javaxargs = javaxargs.substring(1); S progID = onlyUntilSpace(javaxargs); File progDir = programDir(progID); mkdir(progDir); print("ProgDir: " + platformQuote(f2s(progDir))); S javaCmd = "java " + vmArgs + " -jar " + platformQuote(jarPath) + " " + javaxargs; S cmds; if (isWindows()) cmds = "(cd " + platformQuote(f2s(progDir)) + " & " + javaCmd + ")"; else cmds = "/bin/bash -c " + platformQuote( "cd " + platformQuote(f2s(progDir)) + " ; " + javaCmd); nohup(cmds); }