I have been facing a problem since 2 weeks and I'm getting desperate about solving it as it seems to appear in every new project I make. I have created a new maven project, the java_home variable and the path are set properly with my newly installed java directory, I've cleaned the project with maven clean, there is no apparent error and everything seems fine, but when I run the main class, I get this error telling me Could not find or load main class without any other details. It would be really great if you could help me out, thank you in advance. to provide more info, here is the structure of my project
and here is the code of my main class, I'm using hibernate as well
The User_ class is here
Finally here are some screen caps in case you need them
Open your pom.xml file and check if the main class is set in the below element
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>full.path.to.Class</mainClass>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.