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

22
LINES

< > BotCompany Repo | #1005032 // Check my class loader & print the class directories/jars

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Uses 3874K of libraries. Click here for Pure Java version (3853L/26K/94K).

1  
!7
2  
3  
p {
4  
  substance();
5  
  ClassLoader loader = myClassLoader();
6  
  ClassLoader parent = loader.getParent();
7  
  print("My class loader is of type: " + getClassName(loader));
8  
  print("Parent loader: " + getClassName(parent));
9  
  L<File> files = cast getOpt(loader, "files");
10  
  if (files == null)
11  
    print("No info (older JavaX?)");
12  
  else {
13  
    psl(files);
14  
  }
15  
  
16  
  pcall {
17  
    print("JavaX: " + javax());
18  
    print("Class loader of JavaX: " + javax().getClassLoader());
19  
    print("Eclipse: " + javax().getClassLoader().loadClass("org.eclipse.jdt.internal.compiler.batch.Main"));
20  
    //Class.forName("org.eclipse.jdt.internal.compiler.batch.Main");
21  
  }
22  
}

Author comment

Began life as a copy of #1004666

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005032
Snippet name: Check my class loader & print the class directories/jars
Eternal ID of this version: #1005032/7
Text MD5: b2df9ef511b3ef032edede3b72917da0
Transpilation MD5: 2852813b93fe0439e59869c7c6861d28
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-24 16:56:10
Source code size: 670 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 407 / 475
Version history: 6 change(s)
Referenced in: [show references]