在将Eclipse Kepler更新为SR1之后,我不能再从Eclipse运行我的junit测试。
启动Eclipse后,我在日志中看到以下错误消息:
Variable references empty selection: ${project_loc}当选择一个测试用例,并作为Junit Test运行时,我得到了这个错误:
An internal error occurred during: "Launching DrillUtilTest".
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.getProjectRelativePaths(VirtualResource.java:119)
at org.eclipse.wst.common.componentcore.internal.resources.VirtualFile.getUnderlyingFiles(VirtualFile.java:104)
...因此,可能${project_loc}变量是空的,但在我的任何Junit运行配置中都没有使用它。我尝试过以各种方式启动Junit,但它们都给出了相同的结果。在升级到SR1之前,这通常可以很好地工作。
任何帮助都是非常感谢的!
发布于 2013-11-01 00:35:04
每个Eclipse项目都包含一组预定义的路径变量,可用于定义链接资源,包括ECLIPSE_HOME、PARENT_LOC、PROJECT_LOC和WORKSPACE_LOC
如果您右键单击项目并选择Properties,然后转到Resource > Linked Resource,您是否看到列出了这些变量?
https://stackoverflow.com/questions/19710718
复制相似问题