How to create Java classes Dynamically by Java Reflection?

后端 未结 4 949
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 16:57

Reflection is used to load java class classes and manipulate them on the fly. But I have across a weird question that is asking me how to create Java classes on the fly by R

4条回答
  •  情话喂你
    2021-01-03 17:13

    Seems to me you don't need reflection, but just need to call the JavaCompiler directly from your code: JavaCompiler.

提交回复
热议问题