You can compile the source just like you compile your own program "javac *.java". Or do you mean that you want to compile them programmatically in your test suite? If that's the case, the easiest, but probably least flexible, solution is to use Runtime.exec(). See
the Java API documentation for the version of Java you are using for details.
Alternatively, you may want to look at the the classes available in tools.jar. I'm not sure how much documentation is publicly available, but it contains supporting classes for many of the tools you use in Java development, such as javac, java, and javadoc. I really don't know enough about what is available to provide much help, so I hope someone else can.
I hope I've helped point you in the right direction here. If not, please let us know where you can help. Try giving us some more specific information about the problems you are encountering.
HTH
Layne