Code Generation FAQ
How do I install asm in eclipse ?The first thing you need to do is download asm-3.1.jar from asm.objectweb.org
and add it to your project's buildpath. There are several ways to do
this--try rightclicking on your project and selecting "add
external archive". Then browse to and select the jar file,
etc. After you do this, SimpleImageDemo should work.
Back to Top
How do I set the classpath?Java uses the classpath to know where to look for class and jar
files. First, find the complete paths to the directories containing
the classfiles or jar file you need and add these to your classpath.
You can do this permanently (go to control panel-->
Back to Top
What if I'm not using eclipse?I'm not aware of asm plugins for other IDEs. However, you really only need two things, neither of which require eclipse. First, you want to be able to look at the bytecode. You can do this with javap. Second, it is sometimes helpful to see "asmified" code. The org.objectweb.asm.util.ASMifierClassVisitor class will show you this. It contains a main method that takes a class file as a command line parameter and print the asmified code to the console.
Back to Top
|