做junit 单元测试时,发现怎么执行都是以前编译过得代码。

最后找到原因了, src/test/java 编译完的.class路径是 Default output folder

Default output folder:  zphVip/src/main/webapp/WEB-INF/classes

 

解决

1 勾选 Allow output floders for source folders  ------允许源文件夹编译过后的.class输入文件夹自己指定

2 Edit 指定 output floder为 target/classes-----不适用默认,自己指定output floder

解决Junit单元测试 找不到类 ----指定Java Build Path的更多相关文章

  1. 如何解决"The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path"

    今天我在eclipse上搭建新项目时,莫名其妙的出现这个错误,如下: The superclass "javax.servlet.http.HttpServlet" was not ...

  2. 项目忽然出现 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决方法

    0.环境: 新装win8.1系统,Tomcat配置无误. 1.错误: 项目中某一.jps页面忽然出现错误,鼠标点上去为:The superclass "javax.servlet.http. ...

  3. 添加JUnit到Java Build Path

    1.第一种 新建项目,点击右键,选择properties->Java Build Path->Libraries->add library->JUnit->JUnit4- ...

  4. 新建maven指定jdk版本-eclipse新建maven项目报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的解决方案

    具体表现为: 使用Eclipse+Maven建立了一个Javaweb工程,JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.Http ...

  5. The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决方法

    项目忽然出现 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Pat ...

  6. eclipse JavaEE版"javax.servlet.http.HttpServlet" was not found on the Java Build Path问题的解决办法

    使用eclipse JavaEE 版,新建 Dynamic Web Project 项目.在项目里添加 JSP 文件,会在文件头部出现错误提示.提示语句为:The superclass "j ...

  7. eclipse JavaEE版"javax.servlet.http.HttpServlet" was not found on the Java Build Path问题的解决办法

    使用eclipse JavaEE 版,新建 Dynamic Web Project 项目.在项目里添加 JSP 文件,会在文件头部出现错误提示.提示语句为:The superclass "j ...

  8. 新建jsp文件,The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path错误解决方法

    新建一个jsp文件后,有一个错误,The superclass "javax.servlet.http.HttpServlet" was not found on the Java ...

  9. The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决办法

    ♦  未在 Java构建路径中 找到父类 "javax.servlet.http.HttpServlet" ♦ 解决办法: 项目右击 → Build Path → 右侧 Add L ...

随机推荐

  1. AVL树(二)之 C++的实现

    概要 上一章通过C语言实现了AVL树,本章将介绍AVL树的C++版本,算法与C语言版本的一样. 目录 1. AVL树的介绍2. AVL树的C++实现3. AVL树的C++测试程序 转载请注明出处:ht ...

  2. Android学习笔记之HttpClient实现Http请求....

    PS:最近光忙着考试了....破组成原理都看吐了....搞的什么也不想干...写篇博客爽爽吧....貌似明天就考试了...sad... 学习笔记: 1.如何实现Http请求来实现通信.... 2.解决 ...

  3. Vim杂记:markdown插件

    一.安装插件 从以下地址下载压缩包 github下载:https://github.com/plasticboy/vim-markdown plasticboy下载:http://plasticboy ...

  4. 程序代码记Log

    private static object s_lock = new object(); public static void TraceLog(string message, string logF ...

  5. 登陆mysql时提示异常的解决方法

    [root@host2 ~]# mysql -uroot -p Enter password: ERROR (HY000): Can't connect to local MySQL server t ...

  6. [C#] 语法之Attribute

    在c#中,定义类的成员,可以定义Property称为属性.Attribute就称为特性. 在FCL中,有内置的Attribute.如: Condition[Attribute]:在什么条件可以调用.( ...

  7. AccessHelper

    代码: using System; using System.Data; using System.Configuration; using System.Data.OleDb; using ahwi ...

  8. php获取textarea的值并处理回车换行的方法

    //注:\n是用双引号包的的,双引号!!双引号!!! explode("\n",$row[0]['value']

  9. Json Utils

    import java.util.List;import java.util.Map; import net.sf.json.JSONArray;import net.sf.json.JSONObje ...

  10. 开发机多用户 xdebug 远程调试 PhpStorm

    在公司都用的远程开发机开发,每次有错误调试就得dd(xxx)然后保存真是,让我在本地开发用惯xdebug的情何以堪,所以有了下文. 1.安装配置xdebug 直接使用pecl安装即可 # pecl i ...