1 | static Class<?> hotwireSharingLibraries(S progID) ctex { |
2 | Pair<File, S> p = CompilerBot.compileSnippet2(progID); |
3 | File jar = p.a; |
4 | assertTrue(f2s(jar), jar.isFile()); |
5 | |
6 | // collect files (program + libraries) |
7 | |
8 | L<File> files = ll(jar); |
9 | S dehlibs = unnull(loadTextFileFromZip(jar, "libraries")); |
10 | |
11 | L<File> myLibraries = myLibraryFiles(); |
12 | //print("My libraries: " + myLibraries); |
13 | |
14 | Matcher matcher = Pattern.compile("\\d+").matcher(dehlibs); |
15 | while (matcher.find()) { |
16 | S libID = matcher.group(); |
17 | File lib = loadLibrary(libID); |
18 | if (myLibraries.contains(lib)) { |
19 | //print("Skipping lib " + lib); |
20 | } else { |
21 | //print("Adding lib " + lib); |
22 | files.add(lib); |
23 | } |
24 | } |
25 | |
26 | // make class loader |
27 | JavaXClassLoaderWithParent classLoader = new(progID, files, myClassLoader()); |
28 | |
29 | ret hotwire_finish(classLoader, progID, p.b); |
30 | } |
Began life as a copy of #1005578
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: | #1010562 |
Snippet name: | hotwireSharingLibraries |
Eternal ID of this version: | #1010562/14 |
Text MD5: | 3ff3cebab9b7272339dfdcb3b5a20f61 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-10 05:41:07 |
Source code size: | 892 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 558 / 588 |
Version history: | 13 change(s) |
Referenced in: | [show references] |