pteichmann [
http://community.jboss.org/people/pteichmann] created the discussion
"How to add dependencies to bytecode?"
To view the discussion, visit:
http://community.jboss.org/message/640587#640587
--------------------------------------------------------------
Hi there,
I am just working on an instrumentation project. Target is to instrument android
applications. I know its a different VM, but I found a way that works :-).
I do the instrumentation, after the sources are compiled to bytecode, so I have real Java
Bytecode. This I can manipulate with javassist. After this the normal way of the android
build process runs. All is controlled by ant scripts. The package (apk) is built without
errors.
Instrumentation works good so far, but when I try to run the application on a device, I
get an exception, calling "Method not found" or similiar.
I instrument something that uses a java.util.Set. When I run the application, the above
mentioned exception is thrown. I gues, this is because the javasssit compiler knows about
the java.util.set, cause I added the package to the classpool. but somehow it is no longer
available, when the javassist process is done.
my question:
is there any possibility to put all needed dependencies, occured in javassist to the
bytecode, produced by the javacompiler?
If you don't understand my problem, I can try to describe it a different way. But if
you understand it, I would be nice to help ma in any way.
Thanks a lot in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/640587#640587]
Start a new discussion in Javassist at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]