aboutsummaryrefslogtreecommitdiffstats
path: root/docs/dist/README-AspectJ.html
blob: e7bd6fcf126baa93ca29e93940d5577e2f9546ae (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>AspectJ Readme</title>
<STYLE TYPE="text/css">
<!--

   /* FOR THE SDA PAGE */

	/*
	BODY {margin-top: 15px; margin-left: 15px; margin-right: 15px;}
	*/

	A:link {
		color:#4756AC;
	}
	A:visited {
		color:#60657B;
	}
	A:hover {
		color:red
	}

	INPUT {font:12px "Courier New", sans-serif;}

	H2 {
		font:18px/18px Verdana, Arial, Helvetica, sans-serif;
		color:black;
		font-weight:bold;
		margin-left: 10px;
		line-height:110%;
	}
	H3 {
		font:18px/18px Verdana, Arial, Helvetica, sans-serif;
		color:black;
		font-weight:bold;
		margin-left: 10px;
		line-height:110%;
	}
	H4 {
		font:15px/16px Verdana, Arial, Helvetica, sans-serif;
		color:black;
		font-weight:bold;
		margin-left: 10px;
		line-height:140%;
	}
	P {
		font:13px/13px Verdana, Arial, Helvetica, sans-serif;
		margin-right: 10px;
		margin-left: 10px;
		line-height:130%;
	}
	.paragraph {
		font:13px/13px Verdana, Arial, Helvetica, sans-serif;
		margin-right: 10px;
		margin-left: 10px;
		line-height:130%;
	}
	.smallParagraph {
		font:11px/11px Verdana, Arial, Helvetica, sans-serif;
		margin-right: 10px;
		margin-left: 10px;
		line-height:130%;
	}
	/*
	LI {
		font:13px/13px Verdana, Arial, Helvetica, sans-serif;
		text-align:justify;
		margin-right: 10px;
		margin-left: 15px;
		line-height:120%;
	}

	UL {
		font:13px/13px Verdana, Arial, Helvetica, sans-serif;
		text-align:justify;
		margin-right: 10px;
		margin-left: 15px;
		line-height:120%;
	}*/

	DL {
		font:13px/13px Verdana, Arial, Helvetica, sans-serif;
		text-align:justify;
		margin-right: 10px;
		margin-left: 15px;
		line-height:120%;
	}
	B { font:13px/13px Verdana, Arial, Helvetica, sans-serif;
		font-weight:bold;
		line-height:140%;
	}
	.footer {
		font:10px/10px Verdana, Arial, Helvetica, sans-serif;
		color:#888888;
		text-align:left
	}
	.figureTitle {
		font:13px/13px Verdana, Arial, Helvetica, sans-serif;
		text-align:justify;
		text-align:center
	}
	.copyrightNotice {
		font:10px/10px Verdana, Arial, Helvetica, sans-serif;
		color:#999999;
		line-height:110%;
	}
	.smallHeading {
		font:13px/13px Verdana, Arial, Helvetica, sans-serif;
		font-weight:bold;
		line-height:110%;
	}
	.tinyHeading {
		font:11px/11px Verdana, Arial, Helvetica, sans-serif;
		font-weight:bold;
		line-height:120%;
	}
	.newsText {
		font:11px/11px Verdana, Arial, Helvetica, sans-serif;
		line-height:130%;
	}
	.smallParagraph {
		font:11px/11px Verdana, Arial, Helvetica, sans-serif;
		line-height:130%;
	}
	.fancyHeading {
		font:20px/20px Chantilly, Arial, Helvetica, sans-serif;
		margin-right: 10px;
		color:#6f7a92;
		margin-left: 10px;
		line-height:130%;
	}

-->
</STYLE>
</head>

<BODY BGCOLOR="white">

<h2 align="center">AspectJ<sup><small>TM</small></sup></h2>

<p align="center"><i>Version @build.version.long@ released on @build.date@.</i></p>

<h3>1 Contents of this Package</h3>

<UL>
  <li>the <a href="bin"><CODE>&lt;aspectj install dir&gt;/bin</CODE></a>
      directory has scripts for 
       <ul>
	 <li><CODE>ajc</CODE>: the compiler for the AspectJ language</li>

     <!-- XXX removed references to ajdoc and ajdb -->
	 <li><CODE>ajbrowser</CODE>: a graphical editor for 
	 compiling programs with <CODE>ajc</CODE> 
	 and navigating the crosscutting structure of those programs</li>
       </ul>

  <li>the directory <a href="lib"><CODE>&lt;aspectj install dir&gt;/lib</CODE></a>
      has the AspectJ binaries,
       <ul>
	 <li><CODE><a href="lib/aspectjtools.jar">aspectjtools.jar</a></CODE>: libraries for 
	 <code>ajc</code>, <code>ajbrowser</code>, and the Ant tasks</li>

	 <li><CODE>aspectjrt.jar</CODE>: runtime library for AspectJ programs</li>
       </ul>
  </li>
  <li>the directory <a href="doc"><CODE>&lt;aspectj install dir&gt;/doc</CODE></a>
      has examples, programming and development environment guides,
      instructions for the Ant tasks, a README for 1.1 changes,
      and a quick reference, all linked
      from the <a href="doc/index.html">index</a> page.
  </li>
  <li>this <a href="README-AspectJ.html">README-AspectJ.html</a>, and
  </li>
  <li>the <a href="LICENSE-AspectJ.html">LICENSE-AspectJ.html</a>
      applying to this distribution.
  </li>
</UL>

<hr>

<h3>2 Install Procedure</h3>

<p>The AspectJ tools <code>ajc</code> and <code>ajbrowser</code> are
Java programs that can be run indirectly from the scripts or 
directly from <code>aspectjtools.jar</code>.  
The <code>aspectjrt.jar</code> needs to be on the classpath
when compiling or running programs compiled
by <code>ajc</code>.  This procedure shows ways to do that.
</p>

<p>After finishing automatic installation, we recommend that the
following steps to complete your installation:</p>

  <p><b>2.1 Add <CODE>&lt;aspectj install dir&gt;/lib/aspectjrt.jar</CODE> 
      to your class path</b></p>

<blockquote>
  <p>This small .jar file contains classes required to compile programs 
  with the ajc compiler, and to run programs compiled with the ajc
  compiler.  You must have these classes somewhere on your class path
  when running programs compiled with ajc.  For detailed instructions
  please see the <a href="#configInstructions">Configuration
  Instructions</a> at the bottom of this document.</p>
</blockquote>

  <p><b>2.2 Put the AspectJ <code>bin</code> directory on your PATH</b></p>

<blockquote>
  <p>Modify your PATH to include <code><b>&lt;aspectj install
  dir&gt;/bin</b></code>.  This will make it easier to run ajc.
  For detailed instructions please see the
  <a href="#configInstructions">Configuration Instructions</a> at the
  bottom of this document.</p>
</blockquote>

<p><b>2.3 Review the documentation and examples </b></p>

<blockquote>
  <p>Development and programming guides
  are available in <a href="doc/index.html">docs</a>,
  and example programs and an Ant script are available in
  <a href="doc/examples/">examples</a>.
</blockquote>

<p>If you did not use the automatic installation process, you may wish
to create short launch scripts to start ajc easily (section 3).</p>

<hr>

<h3>3. Running the Tools</h3>

<p>If you did not use the automatic installation process or the
default launch scripts do not work on your system, you may wish to
create short launch scripts to start ajc easily.  </p>

<p>You can also run the <code>aspectjtools.jar</code> directly
using java's -jar option:

<blockquote>
<CODE>C:\jdk1.3\bin\java.exe -jar D:\aspectj\lib\aspectjtools.jar %*</CODE>
</blockquote>

<p>With no arguments or only argument list (.lst) files, this will launch
<code>ajbrowser</code>, the GUI structure browser; otherwise, it will
run <code>ajc</code>, the AspectJ compiler.  This means that 
if your browser is set up to run jar files, clicking a link
to <a href="lib/aspectjtools.jar">lib/aspectjtools.jar</a> will 
launch <code>ajbrowser</code>.

<p> You can also create scripts like those created by the installer.
These scripts use full paths that are system dependent so you will
likely have to change these. </p>

<p>Here's a sample launch script for WinNT and Win2K (note that this
is single line in the .bat file):</p>

<blockquote>
<CODE>C:\jdk1.3\bin\java.exe -classpath D:\aspectj\lib\aspectjtools.jar -Xmx64M
org.aspectj.tools.ajc.Main %*</CODE>
</blockquote>

<p>Here's a sample launch script for a Unix shell (on Linux using Sun's JDK1.3):</p>

<blockquote>
<CODE>/usr/java/jdk1.3/jre/bin/java -classpath /home/aspectj/lib/aspectjtools.jar -Xmx64M org.aspectj.tools.ajc.Main "$@"</CODE>
</blockquote>

<hr>
<h3><a name="configInstructions">4. Configuration Instructions</a></h3>

<h4>4.1 Adding <code>&lt;aspectj install dir&gt;/lib/aspectjrt.jar</code> to your classpath</h4>

<p>There are several ways to add this jar file to your classpath:</p>

<ul>
    <li>
      copy <code>aspectjrt.jar</code> to the <code>jdk/jre/lib/ext</code> directory</li>
    <li>
      add <code>aspectjrt.jar</code> to your CLASSPATH
      environment variable (see the next section for details)</li>
    <li>
      always use the "<code>-classpath aspectjrt.jar</code>" option when running
      programs compiled with ajc</li>
</ul>
<h4>4.2 <A NAME="6.1">Setting the Environment Variables on Windows</A></h4>

<P>The following instructions use the PATH variable as an example, but
this process is identical for the CLASSPATH variable.  </P>

<P>You can do the variables permanently for all the shells that you
will run or temporarily only for the current shell.  To change the
PATH only in the current shell, and assuming you've installed AspectJ
in <code>C:\apps\aspectj</code>, type:</P>

<blockquote><code>&gt; set PATH=%PATH%;C:\apps\aspectj\bin</code></blockquote>

<P><b>Changing Environment Variables Permanently on WinNT and Win2000</b>
<ul>
  <li>
    <p class="paragraph">open the Environment Variables dialog
    <ul>
      <li>
        <p class="paragraph">WinNT: in "Control Panels" double-click
        "System" and select the "Environment" tab</li>
      <li>
        <p class="paragraph">Win2K: in "Control Panels" double-click
        "System", select the "Advanced" tab and click the
        "Environment Variables..." button</li>
    </ul>
  </li>
  <li>
    <p class="paragraph">select the environment variable for editing, or add it
    using the "New..." button if it does not exist</li>
  <li>
    <p class="paragraph">add the new entry separated from the others by a
    semi-colon (;) and close the dialog</li>
  <li>
    <p class="paragraph">note that the change will not affect shells that were
    already running </li>
</ul>
<P><b>Changing Environment Variables Permanently on Win9x</b>
<ul>
  <li>
    <p class="paragraph">open the AUTOEXEC.BAT with an editor such as NotePad</li>

<LI>
  <p class="paragraph">edit the PATH statement to include the new entry and save
  the file, e.g.<BR>

<blockquote>
  <CODE>PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\DOS;C:\apps\aspectj\bin</CODE>
  </blockquote>
</LI>
<LI>
  <p class="paragraph">note that the change will not affect shells that were
  already running
</ul>

</body>

</html>