-
-
Notifications
You must be signed in to change notification settings - Fork 710
/
soot_in_eclipse_howto.html
121 lines (95 loc) · 4.05 KB
/
soot_in_eclipse_howto.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<html><head><title>Developing With Soot in Eclipse</title></head>
<body background="background6.gif" TEXT="#000000" BGCOLOR="#F3F3F3" LINK="#0000CC">
<table cellspacing="3" cellpadding="0" border="0">
<tbody><tr>
<!--LeftHandTable-->
<td width="160" rowspace="1" valign="top" align="left">
<p>
<p><font face="helvetica,arial" size="+1"><b>Soot Home</b></font>
<p>
<a href="#creating"><font face="helvetica,arial" size="+0">Create Project</font></a><br>
<a href="#importing"><font face="helvetica,arial" size="+0">Import Sources</font></a><br>
<a href="#recognize"><font face="helvetica,arial" size="+0">Recognize Sources</font></a><br>
<a href="#lib"><font face="helvetica,arial" size="+0">Setup Libraries</font></a><br>
<a href="#building"><font face="helvetica,arial" size="+0">Building</font></a><br>
<a href="#running"><font face="helvetica,arial" size="+0">Running</font></a><br>
<p><a href="http://www.sable.mcgill.ca">Sable Home</a>
<p><a href="index.html">Soot Home</a>
<!--ActualContents-->
</p></td><td valign="top" align="left">
<h3><center>Developing With Soot in Eclipse</center></h3>
<a name="creating"><h5>Step 1: Creating a Project</h5></a>
<ul>
<li>Start Eclipse
<li>Select <tt>File </tt>-- <tt>New</tt> -- <tt>Project</tt>
<li>Select <tt>Java</tt> and <tt>Java Project</tt>
<li>Click <tt>Next</tt>
<br><br>
<li>Give a name to the project
<li>Click <tt>Next</tt>
<li>Click <tt>Finish</tt>
</ul>
<p>You should now have an empty project.</p>
<a name="importing"><h5>Step 2: Importing the Soot Source Files</h5></a>
<ul>
<li>Right click on your project and select <tt>Import</tt>
<li>Select <tt>File System</tt>
<li>Click <tt>Next</tt>
<li>Use <tt>Browse</tt> to find your Soot source files
<li>Select the Soot package root directory to import
<li>Click <tt>Finish</tt>
</ul>
<p>You should now have the regular Soot source files in a src directory in your project.</p>
<p>You also need to import the generated src files. Make sure you have these
built first. (They come built - but if you used ant veryclean at some point you may have deleted them.)</p>
<ul>
<li>Right click on your project and select <tt>Import</tt>
<li>Select <tt>File System</tt>
<li>Click <tt>Next</tt>
<li>Use browse to find the generated Soot sources directories.
<li>Select the generated/options generated/singletons and generated/sablecc directories.
<li>Click <tt>Finish</tt>
</ul>
<a name="recognize"><h5>Step 3: Making Eclipse Recognize Source Files</h5></a>
<p>Now you need to make Eclipse recognize these directories as src directories.</p>
<ul>
<li>Right click on your project
<li>Select <tt>Properties</tt>
<li>From the tree on the right select <tt>Java Build Path</tt>
<li>Pick the <tt>Source</tt> tab
<li>Select <tt>Add Folder</tt>
<li>Select your project src folder
<li>Click <tt>Ok</tt>
<li>Repeat for each of the generated folders
</ul>
<a name="lib"><h5>Step 4: Adding libraries needed by Soot</h5></a>
<p>Now you need to add the Jasmin, Polyglot and Ant libraries, and the Soot classes, to your project.</p>
<ul>
<li>Right click on your project
<li>Select <tt>Properties</tt>
<li>From the tree on the right select <tt>Java Build Path</tt>
<li>Select the <tt>Libraries</tt> tab
<li>Select <tt>Add External Jars</tt>
<li>Use the dialog to select your jasminclasses.jar file
<li>Click <tt>OK</tt>
<li>Repeat for your polyglotclasses.jar file and ant.jar file
<li>Select <tt>Add Class Folder</tt> and choose the "classes" folder to add the Soot classes</li>
<li>Click <tt>OK</tt> again
</ul>
<a name="building"><h5>Step 5: Building your project</h5></a>
<ul>
<li>Select your project
<li>Select <tt>Project</tt> -- <tt>Build Project</tt>
</ul>
<p>Your project should compile with no problems but there will be lots
of warnings. You can ignore these. They are mostly for unused imports.</p>
<a name="running"><h5>Step 6: Running your project</h5></a>
<ul>
<li>Select <tt>Run</tt> -- <tt>Run ...</tt> or <tt>Debug ...</tt>
<li>Select <tt>Java Application</tt>
<li>Select <tt>New</tt>
<li>Use search to find the main class to run
<li>Set arguments under the <tt>Argument</tt> tab
</ul>
</td></tr></tbody></table>
</body></html>