[Soot-list] using soot within an eclipse plugin

Arjun Singh arjsingh at ucdavis.edu
Thu Jun 9 15:23:30 EDT 2005


Hi,

I currently have an Java application that uses soot.  I would like to  
encapsulate the functionality of this application in an eclipse  
plugin.  Unfortunately I have been unsuccessful in doing so.  Below  
are the processes I followed.

Attempt #1: Use soot files from jar
1.  I created a plugin by using the 'plugin with a view' template.
2.  In the project directory, I created a lib folder and put the jar  
file containing all soot classes in it.
3.  I added this jar file to the build path by right clicking on the  
project, selecting project, then selecting java build path, clicking  
on the Add Jars button, and selecting the jar file.
3.  I added library tags within the runtime tags within the  
plugin.xml file
4.  In the java file for the view, within the Action definition for  
pressing one of the buttons of the view, I called a function I wrote  
in a class which calls soot functions.  This class attempts to call  
dk.brics.StringAnalysis, part of another jar file which I use.  This  
function attempts to call Scene.v().loadClassAndSupport with a class  
name of a class that I created in the runtime workbench.
5.  The call to loadClassAndSupport fails because soot cannot locate  
the class I am trying to analyze.

I suspect the problem is related to the classpath of the runtime  
workbench.  I was unable to have soot find the class

Approach #2: Use the soot plugin
When I could not get the jar file with the soot classes to work  
within the eclipse plugin, I installed the soot eclipse plugin (by  
following the directions given on the soot website) and then tried to  
have my plugin use the classes found within the soot plugin.   
However, when I tried to call the soot functions from within my  
plugin, an unhandled event loop exception occurred, which translates  
to eclipse being unable to find/load the soot classes, which I find  
very odd considering the plugin had been installed and I relaunched  
eclipse.

Does anybody have any suggestions or advice for me?  Any help would  
be greatly appreciated.

Thanks,
Arjun


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20050609/3e0c66d8/attachment.htm


More information about the Soot-list mailing list