Now we are going to use Apache Ant to compile the example code in this tutorial, follow the steps below:
| Ableverse™ Tutorials: | D:\study\av6\ |
(with auto created tutorials
subdir from the zip archive)
|
| Ableverse™ Products: | D:\apps\av6\ |
(All files inside the distributed package may be at the first level, so make sure to create a new directory when extracting it) |
| Apache Ant: | D:\apps\apache-ant-1.6.5 |
(There should exists a file D:\apps\apache-ant-1.6.5\bin\ant.bat,
or you'll need to check its directory structure.)
|
D:\study\av6\tutorials\build.xml to set
correct location of Ableverse™ jars. <!-- change this path to where you unpacked the ableverse distribution --> <property name="av6.dir" value="D:/apps/av6" />
This snippet is from build.xml
Locate the red text above and change it to where you've unpacked Ableverse™ jars.<target name="msg">
<javac encoding="UTF-8"
srcdir="examples"
destdir="classes"
debug="true">
<include name="tutor/msg/**/*.java" />
<classpath>
<path refid="av6jars" />
</classpath>
</javac>
<copy todir="classes">
<fileset dir="examples"
includes="tutor/msg/*"
excludes="**/*.java,**/*.css,**/*.html,**/doc-files,**/doc-files/*" />
</copy>
</target>
This snippet is from build.xml
Choose [Start Menu] -> [Run...] then type incmd.exeand click [OK].
You should see a new focused console window appear, and ready to type in commands.
C:\Documents and Settings\Compl>cd /d d:\study\av6\tutorials\ D:\study\av6\tutorials>
D:\study\av6\tutorials>set ANT_HOME=d:\apps\apache-ant-1.6.5 D:\study\av6\tutorials>>set PATH=%PATH%;%ANT_HOME%\bin D:\study\av6\tutorials>
D:\study\av6\tutorials>ant msg
Buildfile: build.xml
msg:
[javac] Compiling 7 source files to D:\study\av6\tutorials\classes
[copy] Copying 2 files to D:\study\av6\tutorials\classes
BUILD SUCCESSFUL
Total time: 6 seconds
D:\study\av6\tutorials>D:\study\av6\tutorials\classes.
| Ableverse™ Tutorials: | /home/compl/study/av6/ |
(with auto created tutorials
subdir from the zip archive)
|
| Ableverse™ Products: | /home/compl/apps/av6/ |
(All files inside the distributed package may be at the first level, so make sure to create a new directory when extracting it) |
| Apache Ant: | /home/compl/apps/apache-ant-1.6.5 |
(There should exists a script file /home/compl/apps/apache-ant-1.6.5/bin/ant,
or you'll need to check its directory structure.)
|
/home/compl/study/av6/tutorials/build.xml to
set correct location of Ableverse™ jars. <!-- change this path to where you unpacked the ableverse distribution --> <property name="av6.dir" value="D:/apps/av6" />
This snippet is from build.xml
Locate the red text above and change it to where you've unpacked Ableverse™ jars.<target name="msg">
<javac encoding="UTF-8"
srcdir="examples"
destdir="classes"
debug="true">
<include name="tutor/msg/**/*.java" />
<classpath>
<path refid="av6jars" />
</classpath>
</javac>
<copy todir="classes">
<fileset dir="examples"
includes="tutor/msg/*"
excludes="**/*.java,**/*.css,**/*.html,**/doc-files,**/doc-files/*" />
</copy>
</target>
This snippet is from build.xml
This is OS/Window Manager dependent, if you are using a UNIX like system, you should know perfectly how to do this.
$ cd /home/compl/study/av6/tutorials/ $
$ ANT_HOME=/home/compl/apps/apache-ant-1.6.5 $ export ANT_HOME $ PATH=$PATH:$ANT_HOME/bin $
$ ant msg
Buildfile: build.xml
msg:
[javac] Compiling 7 source files to /home/compl/study/av6/tutorials/classes
[copy] Copying 2 files to /home/compl/study/av6/tutorials/classes
BUILD SUCCESSFUL
Total time: 6 seconds
$ /home/compl/study/av6/tutorials/classes.