Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1000838 // classicNohupJavax (CURRENT!!) - returns path to output file

JavaX fragment (include)

static File classicNohupJavax(String javaxargs) {
  ret classicNohupJavax(javaxargs, "");
}

static File classicNohupJavax(String javaxargs, String vmArgs) ctex {
  File jar = pathToJavaxJar();
  if (javaxargs.startsWith("#")) javaxargs = javaxargs.substring(1);
  
  S tempPrefix = takeFirst(30, nohup_sanitize(ymd_minus_hms() + "_" + javaxargs + "_"));
  File outFile;
  try {
    outFile = File.createTempFile(tempPrefix, "");
  } catch print e {
    print("Temp file creation failed for " + tempPrefix + ", trying again.");
    outFile = File.createTempFile("", "");
  }
  
  S cmd = joinWithSpace(/*uniquifyList NONONO*/(platformParseArgs(_javaCommand() + " " + vmArgs))) + " -jar " + (isWindows() ? winQuote(jar) : bashQuote(jar)) + " " + javaxargs;
  nohup(cmd, outFile, false);
  ret outFile;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1000838
Snippet name: classicNohupJavax (CURRENT!!) - returns path to output file
Eternal ID of this version: #1000838/12
Text MD5: ba5f773595a69a7d0b01b930dbaa1865
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-01 18:14:12
Source code size: 822 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 689 / 2707
Version history: 11 change(s)
Referenced in: [show references]