Try adding this in build.gradle (gradle version 4.10.x) file and check it out com.xxx.MainClass this is the class where your main method resides:
plugins { id "ua.eshepelyuk.ManifestClasspath" version "1.0.0" } apply plugin: 'application' application { mainClassName = "com.xxx.MainClass" } The above change must resolve the issue, there is another way using script run.sh below could fix this issue, but it will be more of command-line fix, not in IntelliJ to launch gradle bootRun.