我在Eclipse中使用JDK 1.8將Unmarshaller xml轉換爲Java。這條線嘔吐JDK 1.8 JAXB:提供程序com.sun.xml.bind.v2.ContextFactory找不到
JAXBContext jc = JAXBContext.newInstance("com.dtd");
javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory not found
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
一切都從jdk1.8加載。例如:
[從C的裝填javax.xml.bind.ContextFinder:\ Program Files文件\的Java \ jre1.8.0_25 \ LIB \ rt.jar中]
哪裏是com.sun.xml.bind。 v2.ContextFactory?
[Java類使用jaxb api失敗在jira與:提供者com.sun.xml.bind.v2.ContextFactory找不到](http://stackoverflow.com/questions/3093963/java-class-using -jaxb-api-failing-in-jira-with-provider-com-sun-xml-bind-v2-co) – Barett