Error: Could not find or load main class Hello Caused by: java.lang.ClassNotFoundException: Hello studio visual code code example
Example 1: > Task :run FAILED Error: Could not find or load main class Caused by: java.lang.ClassNotFoundException:
Check your build.gradle file and update the application block:
application {
mainClassName = 'packageName.MainClass'
}
Example 2: Error: Could not find or load main class Hello Caused by: java.lang.ClassNotFoundException: Hello studio visual code
package dto;
public class HelloHP {
public static void main(String args[]) {
System.out.println("My first program in Java, HelloWorld !!");
}
}
Example 3: error: could not find or load main class hello caused by: java.lang.classnotfoundexception: hello studio visual code
public class HelloHP {
public static void main(String args []) {
System.out.println("My first program in Java, HelloWorld !!");
}
}