Unable to load java class from w3c

浪子不回头ぞ 提交于 2019-12-04 06:26:12

问题


I am trying to do OPTICS-clustering with ELKI (http://elki.dbs.ifi.lmu.de/).

I try do run the clustering with the provided gui, but then I get this exception:

Error in starting visualizer window.
java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGSVGElement
    at de.lmu.ifi.dbs.elki.visualization.gui.ResultWindow.<init>(Unknown Source)
    at de.lmu.ifi.dbs.elki.visualization.gui.ResultVisualizer$1.run(Unknown Source)
    at [...]
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.svg.SVGSVGElement
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at de.lmu.ifi.dbs.elki.visualization.gui.ResultWindow.<init>(Unknown Source)
    at de.lmu.ifi.dbs.elki.visualization.gui.ResultVisualizer$1.run(Unknown Source)
    at [...]

I unzipped w3c.jar into /usr/share/java and into the path of the program. But it still gives me the same error.

I have quite an old Ubuntu (10.04) with OpenJDK version IcedTea6 1.13.3. But I guess that is not was is causing the trouble, right?

What to do?


回答1:


I think you still have to add that jar into classPath and then it will be recognized.Im not sure what ide you use bud in netbeans for instance rightclick project>libraries>add jar/library.Then your classLoader shoudnt be complaining.



来源:https://stackoverflow.com/questions/24057041/unable-to-load-java-class-from-w3c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!