XMLSerializer xmlSerializer = new XMLSerializer();
JSON json = xmlSerializer.read( xmlString );
System.out.println( json.toString(2) );
Exception in thread "main" java.lang.NoClassDefFoundError: nu/xom/Serializer
at src.main.parser.main(parser.java:19)
Caused by: java.lang.ClassNotFoundException: nu.xom.Serializer
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 1 more
当我从 XML 转换为 Json 时,我得到了这个错误......?
我该如何解决这个问题。
谢谢桑卡尔