Re: Bytecode Specification

David Hovemeyer <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
On Sun, Mar 28, 2004 at 07:22:44PM +0100, Thomas Hawtin wrote:
> Jeffrey Sheldon wrote:
> >
> >I was hoping that somebody on this list might be able to point me in a 
> >good direction to find some documentation on working directly with the 
> >Java bytecode.  I am aware of the book The Java Virtual Machine 
> >Specification, and was hoping to find something more recent (ideally a 
> >specification that defines the bytecode for java 1.5).
> 
> JSR202 covers byte code for 1.5, but doesn't appear to have published 
> anything yet, other than referencing JSR139 pre/split verification. I 
> guess you could look at the source code to retroweaver 
> (.sourceforge.net) which is under an Apache-like licence.
> 
> http://jcp.org/en/jsr/detail?id=202

One more thing - from empirical observation of classfiles produced by the
1.5 beta javac, there is at least one important change.  Specifically,
ldc instructions can now reference a Constant_Class entry in the constant
pool, as a simpler mechanism for evaluating Foo.class expressions,
where Foo is a class.

The CVS head version of BCEL is able to handle this construct.

-Dave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.