當我嘗試使用Marshal和unmarshal時,編譯器得到「無法訪問org.exolab.castor.core.exceptions.CastorException」。我用蓖麻1.3Castor編譯問題
try {
Writer writer = new FileWriter("out.xml");
Marshaller.marshal(person, writer);
Reader reader = new FileReader("out.xml");
metaType = (Person) Unmarshaller.unmarshal(Person.class, reader);
}catch (MarshalException e) {
} catch (ValidationException e) {
}
這是一個編譯錯誤。抱歉不是例外問題。編譯時,我沒有在代碼中顯示錯誤。我已經導入了jar文件 – user236501 2010-01-02 14:38:54
爲什麼你用一個新問題編輯你的問題而不是發佈一個新問題?現在的答案沒有任何意義了。請回滾編輯,接受幫助解決問題併發布新問題的答案。我不會在這裏編輯我的答案,以反映您完全改變的問題。 – BalusC 2010-01-04 01:52:14
沒有幫助解決問題的答案。我會發表一個新的問題,謝謝。 – user236501 2010-01-04 02:18:05