You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by Taff <wa...@gmail.com> on 2006/09/28 11:22:02 UTC

disassemple java byte code

Hi,

How can I disassemble java byte code using BCEL and print java
assembler command list?
Class2HTML is not exact what I want. I would be have API for something
like "javap".

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


Re: disassemple java byte code

Posted by Dave Brosius <db...@apache.org>.
org.apache.bcel.generic.InstructionList

   can take a byte array, using

InstructionList(byte[] code)

like what you would get from calling getCode() on a Code object,

>From there you can get an iterator, using

InstructionList.iterator();

This returns a series of

org.apache.bcel.generic.InstructionHandle

which you can call getInstruction()  on to get an

org.apache.bcel.generic.Instruction

The instruction holds the opcode, and is the base class for all 
instructions, each specific instruction type will hold info about the 
arguments.


----- Original Message ----- 
From: <em...@yahoo.it>
To: "BCEL Users List" <bc...@jakarta.apache.org>
Sent: Thursday, September 28, 2006 9:11 AM
Subject: Re: disassemple java byte code


> If you want there is the program JClassLib 
> (http://www.ej-technologies.com/products/jclasslib/overview.html).
>
>
> Taff <wa...@gmail.com> ha scritto:
>  Hi,
>
> How can I disassemble java byte code using BCEL and print java
> assembler command list?
> Class2HTML is not exact what I want. I would be have API for something
> like "javap".
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------
> Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3 


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


Re: disassemple java byte code

Posted by em...@yahoo.it.
If you want there is the program JClassLib (http://www.ej-technologies.com/products/jclasslib/overview.html).
  

Taff <wa...@gmail.com> ha scritto: 
  Hi,

How can I disassemble java byte code using BCEL and print java
assembler command list?
Class2HTML is not exact what I want. I would be have API for something
like "javap".

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



 		
---------------------------------
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3