When trying to run a test as a TestNG suite, I would get a very cryptic error message saying that TestNG can\'t launch because it references a non-existant project. I think
In my case, the error occurred in a Scala project. It had installed the eclipse plugin, but it had not been used yet.
Diagnostics: If all goes well, the project has a blue S for scala project. If not, it has a yellow PC mouse (for whatever that means).
To fix, you need to
sbt eclipse
on the command-line. Eclipse recognizes it as Scala project at the latest on restart.
In my case the run shortcut was referencing an old project.
Simply right clicking on the folder of the project I was trying to run and selecting my java class fixed the problem.
After that pressing the run button started working again.
It doesn't have to be a Java Project, it could be a Maven one as well. There could be a reference problem with the oldest version of the project. Please try deleting the oldest version from your Eclipse workspace, and then change your reference point.
Solved in a different way for the same issue.
1) Go to Project->properties.
2) In properties window's left pane select "Project Facets".
3) Then click on "Convert to faceted form"
4) Then choose your server and JDK version.
Apply and Close.
Note: Verify the project and the default IDE JRE is same version.
I resolved the issue, follow the below steps:
Right Click on Feature file> Run configurations>check for the feature path and classpath .. It was taking path of previous project. Resolved the issue after selecting current project