Gotcha, thanks. This is how the fixed version looks like:

.source byteCode.j
.class public byteCode
.super java/lang/Object

.method public <init>()V
    aload_0
    invokenonvirtual java/lang/Object/<init>()V
    return
.end method

.method public static main([Ljava/lang/String;)V

    .limit locals 4
    .limit stack 3

    getstatic java/lang/System/out Ljava/io/PrintStream;

    bipush 42
    istore 1

    iload 1
    iinc 1 7
    invokestatic java/lang/String/valueOf(I)Ljava/lang/String;
    astore 2

    aload 2
    invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V

    return

.end method



>
> On Thu, Apr 23, 2009 at 4:07 PM, fadden <[email protected]> wrote:

>
> On Apr 22, 3:22 pm, Mark Fayngersh <[email protected]> wrote:
> > Exception in thread "main" java.lang.VerifyError: (class: byteCode,
> method:
> >
> > > main signature: ([Ljava/lang/String;)V) Expecting to find object/array
> on
> > > stack
> >
> > Does anyone understand what this means? If my source helps, I will paste
> it
> > at the end of this email. I appreciate any guidance and attempts to
> figure
> > this out. I apologize again for android ambiguity.
> [...]
> > >     bipush 42
> > >     astore_2
> >
> > >     aload_2
>
> You pushed the integer 42 onto the stack, and then used the astore_2
> instruction, which is expecting to find an object or array.  I think
> you wanted istore_2 there, and an iload_2 after it.
>
> >
>


-- 
[email protected]
[email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to