How to compile multiple java source files dynamically

1k Views Asked by At

Is there any way to programatically generate class files from .java files present in a folder. There are examples using JavaCompiler.CompilationTask for compiling single java files.But i need to to generate class file from multiple couples .java codes(generated from JAXB gen).

1

There are 1 best solutions below

2
On

Use Runtime.getRuntime().exec("javac ...");