Reputation: 73
Problem : Error: Could not find or load main class
Situation :
How to reporduce
mvn eclipse:clean eclipse:eclipse
Existing projects in workspace
( I do not want to use Maven Project )Already tried :
I appreciate if someone can recommend something new .
[ Update ]
The problem is resolved for all the builds other than 2019-12. I have verified for the following
Upvotes: 0
Views: 1061
Reputation: 856
This question convinced me. This only happen 2019-12.
I have verified for the following.
The cause of the problem is due to restrictions on classpaths that are limited by OS.
- This is a one of related with this issue Java: Support for long classpath on Windows.
You can solve the problem by setting the options for the classpath as shown below.(or from here )
In Spring Tool Suite 3,4 it works without any special configuration.
I haven't found a way to visually identify the problem yet.
This problem is unique.
There's nothing wrong with builds or deploys, it's only a problem when debugging.
So it's easy to tell if it's a problem with the classpath or not.
Upvotes: 2