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

19
LINES

< > BotCompany Repo | #1009052 - pathToJavaxJar

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4042L/27K).

static File pathToJavaxJar() ctex {
  ifndef NoResourceLoader
  IResourceLoader rl = vm_getResourceLoader();
  if (rl != null)
    ret rl.pathToJavaXJar();
  endifndef
  
  int x = latestInstalledJavaX();
  File xfile = new File(userHome(), ".javax/x" + Math.max(x, 30) + ".jar");
  if (!xfile.isFile()) {
    print("Saving " + f2s(xfile));
    String url = x30JarServerURL();
    byte[] data = loadBinaryPage(url);
    if (data.length < 1000000)
      fail("Could not load " + url);
    saveBinaryFile(xfile.getPath(), data);
  }
  ret xfile;
}

Author comment

Began life as a copy of #1000838

download  show line numbers  debug dex   

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

No comments. add comment

Snippet ID: #1009052
Snippet name: pathToJavaxJar
Eternal ID of this version: #1009052/5
Text MD5: b74d467e58795798925ef9b8407d855a
Transpilation MD5: ce23f124038038c3116e2cf2cfaf1259
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-20 12:41:29
Source code size: 563 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 299 / 312
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1009052 & http://1009052.tinybrain.de