Use a custom classloader at compile time

前端 未结 6 1649
星月不相逢
星月不相逢 2021-01-14 04:16

Is it possible to specify a custom classloader for javac (or some alternative java compiler)?

I\'d love such a feat because it would allow me to compile classes that

6条回答
  •  礼貌的吻别
    2021-01-14 04:41

    Take a look at ClassLoader.defineClass. I used it myself for loading plugins into a program I created, in which I loaded a file's bytes into a new class.

提交回复
热议问题