对 jdk1.7/jre/lib/rt 的访问限制.jar
2022-09-02 19:21:39
嗨,伙计们,我在创建我的JAXB解析器时遇到了一个非常奇怪的问题。当我尝试从eclipse生成JAXB类时,在一个类中,它显示了一个非常奇怪的错误,即
Access restriction: The type QName is not accessible due to restriction on required library /usr/lib/jvm/jdk1.7.0_02/jre/lib/rt.jar
这是我的班级
package generated;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
//import javax.xml.namespace.QName;
import javax.xml.namespace.*;
@XmlRegistry
public class ObjectFactory {
在这一行上,我收到错误消息
私有最终静态 QName _ExpenseReport_QNAME = new QName(“”, “expenseReport”);
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link ExpenseT }
*
*/
public ExpenseT createExpenseT() {
return new ExpenseT();
}
/**
* Create an instance of {@link UserT }
*
*/
public UserT createUserT() {
return new UserT();
}
/**
* Create an instance of {@link ItemT }
*
*/
public ItemT createItemT() {
return new ItemT();
}
/**
* Create an instance of {@link ItemListT }
*
*/
public ItemListT createItemListT() {
return new ItemListT();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ExpenseT }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "expenseReport")
public JAXBElement<ExpenseT> createExpenseReport(ExpenseT value) {
return new JAXBElement<ExpenseT>(_ExpenseReport_QNAME, ExpenseT.class, null, value);
}
}