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).

!7

p {
  substance();
  ClassLoader loader = myClassLoader();
  ClassLoader parent = loader.getParent();
  print("My class loader is of type: " + getClassName(loader));
  print("Parent loader: " + getClassName(parent));
  L<File> files = cast getOpt(loader, "files");
  if (files == null)
    print("No info (older JavaX?)");
  else {
    psl(files);
  }
  
  pcall {
    print("JavaX: " + javax());
    print("Class loader of JavaX: " + javax().getClassLoader());
    print("Eclipse: " + javax().getClassLoader().loadClass("org.eclipse.jdt.internal.compiler.batch.Main"));
    //Class.forName("org.eclipse.jdt.internal.compiler.batch.Main");
  }
}

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: 464 / 552
Version history: 6 change(s)
Referenced in: [show references]