summaryrefslogtreecommitdiffstats
path: root/docs/faq
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-01-21 19:53:15 +0000
committerwisberg <wisberg>2003-01-21 19:53:15 +0000
commitd06855e27624ffd2d1b8b14e47e43a3889871b43 (patch)
treef103cb118faeaada1c4062505340c0fd26ba4caa /docs/faq
parente34f6ca4b8f32a46ed29c6dc2305812e365bedf2 (diff)
downloadaspectj-d06855e27624ffd2d1b8b14e47e43a3889871b43.tar.gz
aspectj-d06855e27624ffd2d1b8b14e47e43a3889871b43.zip
added entry for detecting version
Diffstat (limited to 'docs/faq')
-rw-r--r--docs/faq/faq.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/faq/faq.xml b/docs/faq/faq.xml
index 6ff455139..471309e25 100644
--- a/docs/faq/faq.xml
+++ b/docs/faq/faq.xml
@@ -2579,6 +2579,38 @@ java.lang.Integer
</para>
</answer>
</qandaentry>
+ <qandaentry>
+ <question id="q:versioninfo"
+ xreflabel="Q:How do I detect which version I am running?">
+ <para>How do I detect which version I am running?</para>
+ </question>
+ <answer>
+ <para>The <literal>ajc</literal>
+ compiler emits the version when passed the
+ <literal>-version</literal> flag as an argument.
+ </para>
+ <para>To programmatically
+ detect the version of the AspectJ runtime while running
+ under Java 1.4 or later, get the version from the package:
+ <programlisting>
+ Package lang = org.aspectj.lang.JoinPoint.class.getPackage();
+ String version = lang.getImplementationVersion();
+ </programlisting>
+ </para>
+ <para>When running under Java 1.3 or earlier, read the manifest
+ directly. For example code, see the source for
+ <literal>AjBuildManager.checkRtJar(AjBuildConfig)</literal>
+ in the <literal>org.aspectj.ajdt.internal.core.builder</literal>
+ package of the <literal>org.aspectj.ajdt.core</literal> module,
+ available as described in
+ <xref linkend="q:buildingsource"/>.
+ </para>
+ <para>Note that the version of AspectJ for the tools in
+ <literal>aspectjtools.jar</literal> is in
+ <literal>org.aspectj.bridge.Version</literal>.
+ </para>
+ </answer>
+ </qandaentry>
</qandadiv>
<qandadiv id="problems" xreflabel="Common Problems">
<title>Common Problems</title>
@@ -3616,6 +3648,7 @@ vmparam -Xmx384m
<listitem><para><xref linkend="q:buildingsource"/></para></listitem>
<listitem><para><xref linkend="q:testharness"/></para></listitem>
<listitem><para><xref linkend="q:integrateWithDevTools"/></para></listitem>
+ <listitem><para><xref linkend="q:versioninfo"/></para></listitem>
</itemizedlist>
</para>
</answer>