java specify main class code example
Example 1: main class java
public static void main(String[] args) {}
Example 2: java execute jar from main
java -cp MyJar.jar com.packagename.MainClass [somearg1] [somearg2] [etc]
public static void main(String[] args) {}
java -cp MyJar.jar com.packagename.MainClass [somearg1] [somearg2] [etc]