Re: BCEL with jdk 1.5beta2

David Hovemeyer <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.user
Message-ID <[email protected]>
JDK 1.5 changed the classfile format so that LDC instructions
can directly reference class constants.

The latest CVS version of BCEL should correctly handle this.

-Dave

On Mon, Aug 16, 2004 at 02:20:28PM +0530, SH wrote:
> Hi,
> I have trouble analyzing  class files generated with sun's JDK 1.5 beta2.
> a LDC_W.getType() seems to always throw the following exception:
> 
> Exception in thread "main" java.lang.RuntimeException: Unknown or
> invalid constant type at 34
> at org.apache.bcel.generic.LDC.getType(LDC.java:148)
> ...
> 
> Inevitable,  a javap -v <class> on the constant pool offset printed 
> (34 in the example above) has something like this
> --
> ...
> const #11 = Asciz   com/sun/corba/se/spi/logging/LogWrapperBase;
> ...
> const #33 = Asciz   setThrown;
> const #34 = class   #11;    //  com/sun/corba/se/spi/logging/LogWrapperBase
> --
> 
> i.e. CP entry #34 seems to be redirected to #11. it looks like the getType() 
> is unable to handle this redirection.
> 
> is this something new to the 1.5 class file format or the 1.5b2 compiler ?
> Is there a known workaround ? All the classes I am trying to analyze are in
> rt.jar. thanks.
> 
> /sgh
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
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.