mmedv | 4 Feb 05:45 2012

Need help with a strange issue....

I am implementing byte code instrumentation logic to inject inline
instructions into a set of functions
There is a very strange case, where if I insert a single load instruction:

InstructionHandle oStart =
il.append(InstructionFactory.createLoad(Type.OBJECT, ovParams));

it sends hangs everything and sends the CPU into spin.....

Any ideas?

Thank you all



View this message in context:
Sent from the BCEL - User mailing list archive at
Rahul Akolkar | 4 Aug 00:45 2011

[NOTICE] BCEL user mailing list closing

BCEL has moved to Apache Commons. This is the final notice that this
mailing list will be closed shortly.

The Apache Commons user list, a shared mailing list for all Commons
components, should hereafter be used for BCEL related posts. For
details on Apache Commons lists, including how to subscribe and
mailing list conventions, see:

-Rahul Akolkar
 on behalf of the Jakarta PMC
Shirley Park | 15 Jul 22:57 2011

Looking for an inverse JavaClass.dump() method

  Does there exist a method in bcel that does the inverse of 
what JavaClass.dump() does. Where JavaClass's dump method takes the 
JavaClass info and produces a .class file, I am looking for a method 
that takes a .class file and produces some text file with the JavaClass 
representation information on it.
Rahul Akolkar | 8 Jul 23:37 2011

[NOTICE] BCEL moving to Apache Commons

BCEL is moving to Apache Commons. As part of the move, this mailing
list will be closed shortly.

The Apache Commons user list, a shared mailing list for all Commons
components, should hereafter be used for BCEL related posts. For
details on Apache Commons lists, including how to subscribe, see:

-Rahul Akolkar
 on behalf of the Jakarta PMC
y a | 1 Jul 09:50 2011

instrumenting all variable access

HI there

I need to dynamically log all read/write access to any variables/objects
during class execution in the jvm
This is for a phd parallelism research, and i have a strong background in

a. Are there any existing code out there ?
I played with BCEL to trace some of the opcodes... nice stuff

b. Can someone recommend how to add some semantic info  from the .class
source file ?
For example, i would like to know if a certain variable is a for-loop

Has anyone combined some of the syntax-tree parsers with BCEL ?

Thanks for any suggestions or input

yazriel atty  gmail dotty com
Zaree Faryal | 8 Jun 07:44 2011

How to push a Custom Type Object on Stack


I know how to push Primitive Types on Stack using 
InstructinoList.append(new PUSH(ConstantPoolGen,343)); 

Now i want to push Custom Type Object(Obj of some user defined class i.e. Engine 
Class obj) on Stack in BCEL.

Ganesh Kumar Choudhary | 6 Jun 20:06 2011

How to intercept field access using BCEL


I have tried to intercept method calls by enhancing method body. Now I want
to intercept field access. I don't know how to do this. Can anyone help me
in this regard.



Man cannot discover new oceans unless he has the courage to lose sight of
the shore.
Marco Bessi | 1 Sep 16:29 2010

Problems adding IF into a bytecode class

Hi to all,
I need to insert the followings bytecode instructions inside a method of a
.class file.

if(a == null){ //a is an object
long x = System.nanoTime();

I try two way but I have always an Exception.!

TRY 1: (I create a InstructionList (ilFirst) where I insert the followings
InstructionList ilFirst = new InstructionList();
ilFirst.append(new ALOAD(a));
Instruction invokeInterIF = factory.createInvoke("memory.Classe",
"staticMethod", Type.VOID, Type.NO_ARGS, Constants.INVOKESTATIC);
InstructionHandle ihEndIF =
ilFirst.append(factory.createInvoke("java.lang.System", "nanoTime",
Type.LONG, Type.NO_ARGS, Constants.INVOKESTATIC));
ilFirst.insert(invokeInterIF, new IFNULL(ihEndIF));

TRY 2: (I create a InstructionList (ilFirst) where I insert the followings
instructions. I create another InstructionList (ilThanIf ) to insert the
instructions inside the IF)
InstructionList ilFirst = new InstructionList();
ilFirst.append(new ALOAD(a));
InstructionList ilThanIf = new InstructionList();
(Continue reading)

Martin von Gagern | 1 Aug 15:56 2010

Next BCEL release

Hi there!

I see that the latest official BCEL release, 5.2, doesn't support
annotations, but that current trunk seems to support them. So I wonder,
when will there be the next release to make this massively useful
addition available to the masses? After all, 5.2 has been around for
over 4 years, so a new release might make sense in other areas as well.

By the way, seems to have
a bad subscribe link for the dev mailing list. I receive the reply > 550
mail to bcel-dev-subscribe <at> not accepted here
if I try to subscribe to that list. Might be that list accepts members
by invitation only, but in that case the pom should be adjustedt to
reflect this case. Or is it just me encountering this problem?

 Martin von Gagern
Kshipra Singh | 7 Jul 12:52 2010

Write BCEL Books - Packt Publishing

Hi All, 

I represent Packt Publishing, the publishers of computer related books. 

We are planning to extend our range of Open Source books based on Java technology and are currently inviting
authors interested in writing them. This doesn't require any past writing experience. All that we expect
from our authors is a good subject knowlegde, a passion to share it with others and an ability to
communicate clearly in English.

So, if you love BCEL and fancy writing a book, here's an opportunity for you! Send us your book ideas at
author <at> and our editorial team will be happy to evaluate them. Even if you don't have a book
idea and are simply interested in writing a book, we are still keen to hear from you.

Packt runs an Open Source royalty scheme so by writing for Packt you will be giving back to the Open Source Community.

More details about this opportunity are available at:

Kshipra Singh
Author Relationship Manager
Packt Publishing

Skype: kshiprasingh15

Interested in becoming an author? Visit for all the information you need
about writing for Packt.
Shao Xing Huang | 6 Jul 22:01 2010

Shao Xing Huang is out of the office.

I will be out of the office starting  2010-06-25 and will not return until

I will respond to your message when I return.