Update java main method