static void copyMainClassFileFromHotwiredProgram(Class program, File destFile) {
L<File> files = cast get(getClassLoader(program), 'files);
for (File location : files)
if (location.isDirectory()) {
File f = new File(location, "main.class");
if (f.exists()) ret with copyFile(f, destFile);
} else if (location.isFile()) pcall {
ret with extractFileFromZipFile(location, "main.class", destFile);
}
fail("main.class not found in: " + files);
}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: | #1012229 |
| Snippet name: | copyMainClassFileFromHotwiredProgram |
| Eternal ID of this version: | #1012229/2 |
| Text MD5: | 397a6e12bce91fa862b31ad10c47ebd6 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-11-24 13:30:59 |
| Source code size: | 487 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 926 / 944 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |