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 my project does exist, I see it in the package explorer!
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- Illegal to have multiple roots (start tag in epilo
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
It turns out you just have to make sure your project is a Java Project, and not a Simple project. Check that the navigator shows a little blue 'J' associated with the folder. If not, then you have created a Simple project.
"It would appear that the project you created is not Java project.
Eclipse auto-builds the .java file to .class files for all .java files contained in a Java project.
To create a Java project File>New>Project>Java Project Give the project a name. Click Finish"
Found this answer hidden deep in this source.
In eclipse you should be using Navigator and not Package explorer, as navigator is browsing the actual filesystem, where package explorer is loading certain things only. In the future hopefully people can find the solution more easily.
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
on the command-line. Eclipse recognizes it as Scala project at the latest on restart.
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.