2013-04-09 31 views

回答

1

JAXBContext.newInstance抛出一个checked异常。你将无法直接在一个字段上设置它。您需要将其移动到构造函数中,并使用try/catch块将其包围。