Rely on generated runMain to test if a main method is present instead of hardcoded Main.main
Merge pull request #938 from JanBessai/JavaUseRunMain

Java back-end: Look for generated runMain