Fixed java runner, refactored compile function usage