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

14
LINES

< > BotCompany Repo | #1000853 // backtickJavax

JavaX fragment (include)

static String backtickJavax(String javaxargs) ctex {
  File x20file = new File(userHome(), ".javax/x20.jar");
  if (!x20file.isFile()) {
    String url = "http://tinybrain.de/x20.jar";
    byte[] data = loadBinaryPage(url);
    if (data.length < 1000000)
      fail("Could not load " + url);
    saveBinaryFile(x20file.getPath(), data);
  }
  String jarPath = x20file.getPath();
  String cmd = "java -jar " + (isWindows() ? winQuote(jarPath) : bashQuote(jarPath)) + " " + javaxargs;
  print("Running: " + cmd);
  return backtick(cmd);
}

Author comment

Began life as a copy of #1000838

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1000853
Snippet name: backtickJavax
Eternal ID of this version: #1000853/1
Text MD5: 27fb825495a6b415fb4f5b0d9c97345d
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-30 17:25:45
Source code size: 549 bytes / 14 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 573 / 775
Referenced in: [show references]