Answers for "Error: Could not find or load main class PC"

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 {
    // Define the main class for the application.
  	// insert the entire name of the class
    mainClassName = 'packageName.MainClass'
}
Posted by: Guest on October-15-2020
0

Error: Could not find or load main class PC

The main() method is required to run/execute programs developed in the Java programming language since it is where the program execution begins. When starting a Java program, you could encounter the warning “error: Could not find or load main class.” You’re having this problem because you’re using the java command to run main() from within the class.
Posted by: Guest on December-16-2021

Code answers related to "Error: Could not find or load main class PC"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language