I have a simple .txt file which has pure Java code inside it like
public class C { public static void main(String[] args ) { System.out.prin
Check out this thread for how to start the compile from within Java...
How to set the source for compilation by a CompilationTask