Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

error: could not find or load main class main caused by: java.lang.classnotfoundexception: main

//well, that means that ur main method doesn't exist, or your main method is out of your class.
//so, keep focusing in bracing part.
//main method should be like this:
Class main{
	public static void main(String[] args) {
	//ur code
	}
}


//hopefully this can help u :D
Comment

> 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'
}
Comment

PREVIOUS NEXT
Code Example
Java :: display two dimensional array java 
Java :: transparent card background android 
Java :: how to get start char in string in java 
Java :: model mapper to list stream 
Java :: fullscreen java 
Java :: Implementing the Vector Class in java list 
Java :: https://www.baeldung.com/hibernate-inheritance 
Java :: calendar check if month is 30 days 
Java :: create an empty array in java 
Java :: cannot find symbol iterator in java 
Java :: protobuf java gradle mvn 
Java :: check if two lists are equal java 
Java :: border swing 
Java :: java file creation date 
Java :: java random threadlocalrandom double with 2 decimal places 
Java :: resultset next method 
Java :: Read json url in android - NAYCode.com 
Java :: hangfire list recurring jobs 
Java :: marshalling in java 
Java :: double if statement java 
Java :: initialize empty dictionary java 
Java :: java continue statement 
Java :: how to change datatypes in java 
Java :: get distinct values from list of objects java 
Java :: set web image to imageview android java 
Java :: Java Access Array Elements 
Java :: @restcontroller 
Java :: unresolved reference activity_main 
Java :: import string java 
Java :: how do you handle exceptions in java 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =