Junit tests won't run in eclipse kepler

2019-09-22 02:05发布

Junit works when compiling in command line on Linux but not in eclipse kepler.

I'm using maven, jboss and spring. When I run the program it says 'launching classname' has encountered a problem, an internal error occurred during: "Launching classname".
Details: An internal error occurred during: "Launching classname", java.lang.NullPointerException.

1条回答
smile是对你的礼貌
2楼-- · 2019-09-22 02:40

If you're running maven, you can close out eclipse, open a command prompt and run:

mvn eclipse:clean
mvn eclipse:eclipse

I tried this before posing this question with eclipse open in the background; make sure it is closed! Also I deleted my workspace and restored said workspace but that's probably irrelevant. Sidenote: the solution posed by aryaxt didn't work for me. Hope it works for you!

查看更多
登录 后发表回答