Dynamic Compiling Without Create Physical File

后端 未结 2 944
别跟我提以往
别跟我提以往 2020-12-22 05:47

I follow the tutorial from Generating Java classes dynamically through Java compiler API, the code is work but what I see is the program will create a class file after compi

2条回答
  •  醉话见心
    2020-12-22 06:43

    For what your doing, I would use Janino. It appears doable using just the JavaCompiler, but not well documented. See the comment I added withe linked question for an example of going about it with the JavaCompiler.

    EDIT: I found an easy to understand example using the JavaCompiler.

提交回复
热议问题