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

10
LINES

< > BotCompany Repo | #1003628 - fixContextClassLoader - fix context class loader for current thread so libraries are found by Java Sound etc.

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

Libraryless. Click here for Pure Java version (86L/1K).

/* binary break!
static ClassLoader fixContextClassLoader() {
  var cl = myClassLoader();
  Thread.currentThread().setContextClassLoader(cl);
  ret cl;
}*/

static void fixContextClassLoader() {
  Thread.currentThread().setContextClassLoader(myClassLoader());
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003628
Snippet name: fixContextClassLoader - fix context class loader for current thread so libraries are found by Java Sound etc.
Eternal ID of this version: #1003628/3
Text MD5: 72008afb3384d8166bc85ff216e2889c
Transpilation MD5: 4855f3cfec9a524f4e6f923f85e84361
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-27 13:46:51
Source code size: 270 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 467 / 567
Version history: 2 change(s)
Referenced in: [show references]