简体   繁体   中英

Java org/objectweb/asm/ClassVisitor not found

I'm trying to run a project in Eclipse that uses java RMI, but when I run it, it gives me the following error:

java.rmi.ServerError: Error occurred in server thread; nested exception is:  
    java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor

The asm-3.1.jar library is already in the project classpath and if I try to import the class org.objectweb.asm.ClassVisitor, it is correctly seen. Thus, the problem appears a runtime.

Any suggestion?

Thank you

Edit (Eclipse classpath file):

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
    <classpathentry kind="lib" path="lib/asm-3.1.jar"/>
    <classpathentry kind="lib" path="lib/asm-analysis-3.1.jar"/>
    <classpathentry kind="lib" path="lib/asm-commons-3.1.jar"/>
    <classpathentry kind="lib" path="lib/asm-tree-3.1.jar"/>
    <classpathentry kind="lib" path="lib/asm-util-3.1.jar"/>
    <classpathentry kind="lib" path="lib/asm-xml-3.1.jar"/>
    <classpathentry kind="lib" path="lib/commons-io-2.4.jar"/>
    <classpathentry kind="lib" path="lib/java-cup-11a.jar"/>
    <classpathentry kind="lib" path="lib/jdom.jar"/>
    <classpathentry kind="lib" path="lib/jmockit_B.jar"/>
    <classpathentry kind="lib" path="lib/jode-1.1.2-pre1.jar"/>
    <classpathentry kind="lib" path="lib/junit-4.6.jar"/>
    <classpathentry kind="lib" path="lib/junit-4.9b2.jar"/>
    <classpathentry kind="lib" path="lib/ModifiedClasses.jar"/>
    <classpathentry kind="lib" path="lib/tools.jar"/>
    <classpathentry kind="lib" path="lib/uispec4j-2.4-jdk16.jar"/>
    <classpathentry kind="lib" path="lib/uispec4j-jdk6-2.0.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

Add the jars needed at runtime to the Eclipse's Run classpath configuration. Click either on "Add JARs" or "Add External JARs" buttons:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM