java.lang.TypeNotPresentException报错解决方案

使用STS,给项目install,tomcat:run的时候,报下面的错:

java.lang.TypeNotPresentException

或者

ClassNotFoundException..........

第一步:     首先可以查看一下,你的JRE使用的是不是STS默认用的路径:

window-->preferences------->    .......修改成你自己jre安装的路径;apply----OK

如果你还是报错,并提示其他,先给个网,然后更新,启动第二部:

第二部:安装阿里云镜像:

window-->preferences-------> 

 点击:open file:进入:setting.xml

在尾部添加:

  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
     <mirror>
        <id>nexus-aliyun</id>
        <mirrorOf>central</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
  </mirrors>

然后重新更新,install,希望成功!!!!!

猜你喜欢

转载自blog.csdn.net/qq_39382158/article/details/81842037