HoneyMoose
  • 首页
  • Java
  • Jersey
  • Jira
  • Confluence
  • U.S.
    • USRealEstate
    • USVisaTrack
    • H1B
  • 项目和网站
    • CWIKI.US
    • OSSEZ 社区
    • WIKI.OSSEZ.COM
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
BLOG.OSSEZ.COM
A responsive blog theme focused om user reading experience
  1. Home
  2. Computer Science
  3. This article

Java 项目编译的时候提示 javax.xml.bind.annotation does not exist 错误

2022年05月09日 457Browse 0Like 0Comments

提示的错误信息为:

javax.xml.bind.annotation does not exist

 

javax-01

 

错误原因

这是因为针对这个老的项目,我们是使用 JDK 11 进行编译的。

但是 JDK 11 中已经没有: javax.xml.bind 这个包。

需要在 POM 的依赖中添加下面的内容:

		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.3.0</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-core</artifactId>
			<version>2.3.0</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>2.3.0</version>
		</dependency>

 

javax-02

 

添加上面的依赖到 POM 文件中就可以解决编译的错误了。

 

https://www.ossez.com/t/java-javax-xml-bind-annotation-does-not-exist/13958

Tags: None
Last updated:2022年05月09日

Kratos

stay absorbed stay excellent

Like
< Previous
Next >

Comments

Cancel reply

Newest Hotspots Random
Newest Hotspots Random
IntelliJ IDEA 2023.1 版本添加了包中类的列表功能 Jenkins 修改启动的端口 Spring 项目运行提示错误 Not a managed type Linux 查看 SELinux 的状态 WordPress 网站 Error Establishing a Database Connection(建立数据库连接时出错) Linux 开启或关闭 SELinux
Confluence 6 安装 Active Directory 证书服务器 Spring @Autowired 注解静态变量 为什么现在有这么多卖特价商务舱、头等舱机票的 Confluence 6 你模板中可用的对象 如何看待南京一女子利用航班延误骗保 300 多万元 MessagePack Java 0.6.X 可选字段
Categories
  • Algorithm(算法)
  • AMQP
  • Angular
  • CI
  • Compile And CI
  • Computer Science
  • Confluence
  • DataBase
  • Gradle
  • H1B
  • Hibernate
  • IDE
  • Java
  • Jersey
  • Jira
  • MariaDB
  • PrestaShop
  • Spring
  • Spring Batch
  • U.S.
  • USRealEstate
  • USVisaTrack
  • 我的小厨

COPYRIGHT © 2020 HoneyMoose. ALL RIGHTS RESERVED.

THEME CWIKIUS.CN MADE BY VTROIS