英文:
migrate import javax.xml.datatype.XMLGregorianCalendar; jdk11 to jakarta in jdk17
问题
I have an application that I must migrate from jdk11 to jdk17 and when trying to generate my soap classes they are generated with the following import javax.xml.datatype.XMLGregorianCalendar; in jdk17 javax it becomes jakarta but I can't find the XMLGregorianCalendar counterpart, could someone guide me in which library applies in this case.
我有一个必须从jdk11迁移到jdk17的应用程序,当尝试生成我的SOAP类时,它们生成了以下导入javax.xml.datatype.XMLGregorianCalendar;在jdk17中,javax变为jakarta,但我找不到XMLGregorianCalendar的对应项,有人可以指导我在这种情况下应该使用哪个库。
I need to change this:
我需要更改这个:
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
to this, but the last import I don't know how to do it:
改成这样,但是最后一个导入我不知道怎么做:
import java.math.BigInteger;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
英文:
I have an application that I must migrate from jdk11 to jdk17 and when trying to generate my soap classes they are generated with the following import javax.xml.datatype.XMLGregorianCalendar; in jdk17 javax it becomes jakarta but I can't find the XMLGregorianCalendar counterpart, could someone guide me in which library applies in this case.
I need change this:
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
to this, but the last import i don't know how do it this:
import java.math.BigInteger;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
答案1
得分: 2
The XMLGregorianCalendar
is in the "javax.xml" package as it still is part of the "main" java project so you can use it as is.
You can read its documentation of the last version (20 as of writing the answer) at https://docs.oracle.com/en/java/javase/20/docs/api/java.xml/javax/xml/datatype/XMLGregorianCalendar.html
英文:
The XMLGregorianCalendar
is in the "javax.xml" package as it still is part of the "main" java project so you can use it as is.
You can read its documentation of the last version (20 as of writing the answer) at https://docs.oracle.com/en/java/javase/20/docs/api/java.xml/javax/xml/datatype/XMLGregorianCalendar.html
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论