Java: Load class from string

后端 未结 4 2118
粉色の甜心
粉色の甜心 2020-12-18 16:09

I know this has probably something to do with class loaders, however I couldn\'t find an example (it might be I\'m google-ing for the wrong keywords.

I am trying to

4条回答
  •  半阙折子戏
    2020-12-18 16:47

    You could compile it using JavaCompiler but I suggest you to use Groovy for this run-time class creation. It would be much easier.

提交回复
热议问题