function to compile, execute and test java code.