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

or

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

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

-- 
Erik Corry         I'd be a Libertarian, if they weren't all a
[EMAIL PROTECTED]     bunch of tax-dodging professional whiners.   - B. Breathed.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to