I have been trying to run the following program
import java.io.IOException;
import org.apache.bcel.classfile.ClassParser;
import org.apache.bcel.classfile.ConstantPool;
import org.apache.bcel.classfile.JavaClass;
public class BCELTest {
public static void main(String[] args) {
try {
ClassParser parser = new ClassParser("HelloWorld.class");
JavaClass jClass = parser.parse();
//jClass.dump(System.out);
System.out.println(jClass.toString());
ConstantPool cPool = jClass.getConstantPool();
System.out.println("****Constant Pool****");
System.out.println(cPool.toString());
} catch(IOException ioEx) {
ioEx.printStackTrace();
}
}
}
I am recieving a number of errors when attempting to compile this program. The packages are not recognised, I have set my CLASSPATH to bcel.jar but I am still recieving the errors, would anybody have any idea how I could solve this problem?