1Check your build.gradle file and update the application block:
2
3application {
4 // Define the main class for the application.
5 // insert the entire name of the class
6 mainClassName = 'packageName.MainClass'
7}
8
1// after compiling
2$ javac Main.java
3// instead of
4$ java Main.class
5// try running
6$ java Main