Added java class run function.