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

12
LINES

< > BotCompany Repo | #1031479 // addByteCodePathToClassLoader (jar or directory)

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

Libraryless. Click here for Pure Java version (3858L/22K).

sbool addByteCodePathToClassLoader(ClassLoader cl, File bytecode, S libraryID default null) ctex {
  // new method signature
  Bool b = cast callOpt(cl, "addFile", bytecode, libraryID);
  
  if (b == null)
    // legacy method signature
    b = isTrue(call(cl, "addFile", bytecode));
    
  if (b) print("Added byte code path " + bytecode + " to " + cl
    + appendBracketed(libraryID));
  ret b;
}

Author comment

Began life as a copy of #1031281

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031479
Snippet name: addByteCodePathToClassLoader (jar or directory)
Eternal ID of this version: #1031479/9
Text MD5: 175e412ac8e0303d717d70f2d161f079
Transpilation MD5: b5e0e63831339c52178884dce5b82c96
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-06 01:14:05
Source code size: 411 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 174 / 262
Version history: 8 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1031834 - addLibraryToClassLoader