allow java and hadoopJava type to run static main method

make java and hadoopJava types able to run user java programs from their main method.
this also allows user to run third party library that starts from main method, such as DistCP