Use a custom classloader at compile time

前端 未结 6 1651
星月不相逢
星月不相逢 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:26

    Just to expand on Michael's answer, if you cannot use Java6, look at the sun. packages--they have always been available to java apps and have always had a compiler in there, it's just not standard Java so you don't hear about it much and the API is subject to change (like moving it to the javax.tools package!)

提交回复
热议问题