1 | set flag AllPublic. |
2 | |
3 | static Class<?> hotwireSharingClasses(S progID, Class... classesToShare) ctex { |
4 | Pair<File, S> p = CompilerBot.compileSnippet2(progID); |
5 | File jar = p.a; |
6 | assertTrue(f2s(jar), jar.isFile()); |
7 | |
8 | // collect files (program + libraries) |
9 | |
10 | L<File> files = ll(jar); |
11 | S dehlibs = unnull(loadTextFileFromZip(jar, "libraries")); |
12 | |
13 | L<File> myLibraries = myLibraryFiles(); |
14 | |
15 | Matcher matcher = Pattern.compile("\\d+").matcher(dehlibs); |
16 | while (matcher.find()) |
17 | files.add(loadLibrary(matcher.group())); |
18 | |
19 | // make class loader |
20 | JavaXClassLoaderWithParent2 classLoader = new(progID, files, myClassLoader(), map className(classesToShare)); |
21 | |
22 | ret hotwire_finish(classLoader, progID, p.b); |
23 | } |
Began life as a copy of #1010562
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: | #1011217 |
Snippet name: | hotwireSharingClasses |
Eternal ID of this version: | #1011217/4 |
Text MD5: | 9aec02cd1418300889210db312a3840a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-19 20:28:06 |
Source code size: | 737 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 465 / 505 |
Version history: | 3 change(s) |
Referenced in: | [show references] |