Is it possible to have the System ClassLoader load .class files specified at run time?

后端 未结 6 1002
[愿得一人]
[愿得一人] 2021-01-01 00:09

I am writing a static analysis tool for an assignment, it analyses Java bytecode using the ASM library. One of the parts of ASM that we use requires (or at least, appears to

6条回答
  •  天命终不由人
    2021-01-01 00:44

    You can't, as far as I know, extend the System class loader at runtime, but you can dynamically load classes from an arbitrary location (jar or directory) using URLClassLoader.

提交回复
热议问题