Junit测试不会在eclipse开普勒中运行 [英] Junit tests won't run in eclipse kepler

查看:119
本文介绍了Junit测试不会在eclipse开普勒中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Junit在Linux上的命令行编译时工作,但不在eclipse开普勒中。

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

我正在使用maven,jboss和spring。当我运行程序时,它说启动类名遇到问题,在启动类名期间发生内部错误。

详细信息:在启动类名, java.lang.NullPointerException 期间发生内部错误。

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.

推荐答案

如果您正在运行maven,可以关闭eclipse,打开命令提示符并运行:

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

mvn eclipse:clean
mvn eclipse:eclipse

在这样的背景下,我用eclipse打开这个问题,确保它是封闭的!
此外,我删除了我的工作区并恢复了工作区,但这可能是无关紧要的。
Sidenote:aryaxt提出的解决方案对我来说没有效果。希望它适合你!

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!

这篇关于Junit测试不会在eclipse开普勒中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆