How to compile multiple java source files dynamically

975 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 answers

2
ControlAltDel On

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