解决方案 »

  1.   

    Eclipse视图界面调到Package Explorer试试,网上有人这么解决的:
    http://howsun.blog.sohu.com/165447433.html如果不行,可能是m2e插件有问题,卸掉重装试试。
      

  2.   

    使用maven管理,将jar包全部放到maven的pom.xml文件中的dependency中去。参考下面
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
    <groupId>Excutor_Test</groupId>
    <artifactId>src</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    </parent>

    <artifactId>aaa</artifactId>
    <name>aaa</name>

    <dependencies>
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>5.0</version>
    </dependency>
    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql</artifactId>
    <version>3.1.4</version>
                       //此处不需压迫package属性,默认为jar,scope为compile
    </dependency>
    </dependencies>
    </project>