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)

1  
static File classicNohupJavax(String javaxargs) {
2  
  ret classicNohupJavax(javaxargs, "");
3  
}
4  
5  
static File classicNohupJavax(String javaxargs, String vmArgs) ctex {
6  
  File jar = pathToJavaxJar();
7  
  if (javaxargs.startsWith("#")) javaxargs = javaxargs.substring(1);
8  
  
9  
  S tempPrefix = takeFirst(30, nohup_sanitize(ymd_minus_hms() + "_" + javaxargs + "_"));
10  
  File outFile;
11  
  try {
12  
    outFile = File.createTempFile(tempPrefix, "");
13  
  } catch print e {
14  
    print("Temp file creation failed for " + tempPrefix + ", trying again.");
15  
    outFile = File.createTempFile("", "");
16  
  }
17  
  
18  
  S cmd = joinWithSpace(/*uniquifyList NONONO*/(platformParseArgs(_javaCommand() + " " + vmArgs))) + " -jar " + (isWindows() ? winQuote(jar) : bashQuote(jar)) + " " + javaxargs;
19  
  nohup(cmd, outFile, false);
20  
  ret outFile;
21  
}

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: 692 / 2712
Version history: 11 change(s)
Referenced in: [show references]