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
To avoid creation of class file by the JavaCompiler use the argument: "-proc:only"
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
.