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

17
LINES

< > BotCompany Repo | #1016156 // addLibraryToCurrentProgram

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

Libraryless. Click here for Pure Java version (7140L/42K).

1  
// TODO: simplify, use new method JavaXClassLoader.addFile
2  
3  
sbool addLibraryToCurrentProgram(S libID) {
4  
  ret addLibraryToCurrentProgram(loadLibrary(libID));
5  
}
6  
  
7  
sbool addLibraryToCurrentProgram(File f) ctex {
8  
  if (f == null || currentProgramHasLibrary(f)) false;
9  
  ClassLoader cl = myClassLoader();
10  
  ret isTrue(call(cl, "addFile", f));
11  
  /*Cl<File> files = cast get(cl, 'files);
12  
  synchronized(cl) {
13  
    files.add(f);
14  
    call(cl, 'addURL, f.toURI().toURL());
15  
  }
16  
  true;*/
17  
}

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: #1016156
Snippet name: addLibraryToCurrentProgram
Eternal ID of this version: #1016156/10
Text MD5: 7d4a9209dc1d78a9be687b37c2da72b1
Transpilation MD5: e14b0d8550a1dc5e66fb04be36b0ddc2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-06 00:49:59
Source code size: 495 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 439 / 593
Version history: 9 change(s)
Referenced in: [show references]