| javassist : ClassNotFound Exception while using javassist.jar in plugin [message #502866] |
Wed, 09 December 2009 23:06 |
Eclipse User |
|
|
|
HI all,
I am trying to use Javassist.jar as a part of eclipse plugin. For this, I have created a plugin using Javassist.jar and added this plugin dependency in my custom plugin (say ByteCodePlugin).
Using Javassist API, I am trying to add some assertions in class file ( which is selected by user using plugin UI), to collect the information about the class loader being in use.
If I try to run this utility (a class file which has the code related to .class file manipulation using Javassist.jar) as a stand alone java program i.e. through command line using main method and specify the class file name along with package structure (like: com.code.MyDemo where MyDemo is the class in which I want to add my assertions), this works fine and all the assertions are added properly.
But if I try to invoke same method through ByteCodePlugin (as explained in first paragraph) and pass the user selected class to the above utility, I am getting Javassist : ClassNotFound exception.
One thing that I noticed here is, the classloader by which the javassist.jar is loaded is different than the classloader of MyDemo.java.
Please help me in resolving this issue so that I can load the MyDemo.java class using Javassist.jar.
Thanks,
Vishal
|
|
|
Powered by
FUDForum. Page generated in 0.07805 seconds