ASMifier class is missing in ASM 3.3.1

According to the ASM FAQ , in order to get an example of ASM code I have to use a class ASMifier

like:

java -classpath "asm.jar;asm-util.jar" org.objectweb.asm.util.ASMifier org/domain/package/YourClass.class

      

But this is throwing me an error:

Error: Could not find or load main class org.objectweb.asm.util.ASMifier

      

Looking at the JAR files, the class ASMifier

appears to be missing, although its helper classes are present:

./org/objectweb/asm/util/ASMifierClassVisitor.class
./org/objectweb/asm/util/ASMifierAnnotationVisitor.class
./org/objectweb/asm/util/ASMifierMethodVisitor.class
./org/objectweb/asm/util/ASMifierAbstractVisitor.class
./org/objectweb/asm/util/ASMifierFieldVisitor.class

      

This is with ASM 3.3.1, as provided by Fedora 20. Is the FAQ for a newer version and should I use different instructions? Did Fedora mess up the packaging (although their bug tracker doesn't show anything)? Something else?

+3


source to share


1 answer


When browsing the ASM SVN repository, you can read the changelog ASMifier

in : formerly known asASMifierClassVisitor

, which was also the name of this utility in version 3.1.1.

ASM has never had a reputation for supporting binary or even compilation compatibility. As such, you might run into several problems like the one you describe when using non-bleeding versions of the library. (The authors promised to improve this after ASM version 4.) However, you or the libraries you use should always repackage ASM in a different namespace to avoid such problems. It is even recommended in the FAQ for using ASM .



To run your example, you will need to use:

java -classpath "asm.jar;asm-util.jar" \
    org.objectweb.asm.util.ASMifierClassVisitor \
    org/domain/package/YourClass.class

      

+3


source







All Articles