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 | JavaXClassLoader classLoader = new JavaXClassLoader(progID, files, myClassLoader()); |
28 | |
29 | ret hotwire_finish(classLoader, progID, p.b); |
30 | } |
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: | #1010566 |
Snippet name: | hotwireSharingLibraries_v1 [doesn't work] |
Eternal ID of this version: | #1010566/1 |
Text MD5: | 5e9215580af4341bbc62e23d6aa007a5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-21 17:32:07 |
Source code size: | 889 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 389 / 412 |
Referenced in: | [show references] |