This small trick will tell you how you can compile a java source file from another java file on the go. You do not need to run it on a different page and compile it there and then get back to this program. This will be immensely helpful for a program that has some dynamic segments of codes which need to be compiled here within. Basically what we are gonna do is  we will use getSystemJavaCompiler() method in the ToolProvider class  that returns an object of some class that implements JavaCompiler.  Full article (198 words) »