jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Corry <e...@arbat.com>
Subject Re: Help inserting instructions - simple question
Date Wed, 14 Jan 2004 21:00:11 GMT
On Wed, Jan 14, 2004 at 08:33:48PM -0000, Al wrote:
> Will somone please take a quick look at the example below. I am trying to modify each
method in a class s.t. the first thing it does is allocate a new byte[] (for the moment Im
happy to just create it and let it go, ... I mean I dont need to bind it to anything). I dont
understand what more I am supposed to do to insert instructions in a method. This code will
result in an error like -
> Exception in thread "main" java.lang.VerifyError: (class: tests/test1/Test, method: main
signature: ([Ljava/lang/String;)V) Unable to pop operand off an empty stack

Probably the best thing is to run either

java org.apache.bcel.util.Class2HTML mymodifiedclassfile.class


java org.apache.bcel.verifier.Verifier mymodifiedclassfile.class

and look at the output until you can see where you are getting a stack

Erik Corry         I'd be a Libertarian, if they weren't all a
erik@arbat.com     bunch of tax-dodging professional whiners.   - B. Breathed.

To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org

View raw message