ajc and iajc are extensions to the JDT compiler that ships with Eclipse. Thus, ajc and iajc will create exactly the same byte code for pure Java as Eclipse (which contains some minor differences from Oracle javac).
ajc and iajc are basically the same, except that iajc is incremental (i in iajc). This means that the compiler checks the timestamps and makes a more reasonable incremental build, if possible, and avoids full builds (just like when using AJDT inside eclipse). In addition to this functionality, they are essentially the same. See here for more information:
http://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html
If the project does not contain aspects, the use of the ajc compiler is optional. These projects can be included in the inpath of a project that contains aspects. To compile elements containing aspects of the code style, you need to use ajc.
Aspects of design style are slightly different. If you use annotation style only for LTW, you can use javac to compile them until the correct aop.xml file is created, which will be available at runtime.
However, for CTW weaving annotation style, ajc is required.
In your specific case above, you can compile TestProject with javac if it is on the way to your aspect project. This would mean that the class files of your TestProject would be overwritten and merged with the class files from your aspect project.
Or, if you use LTW, you do not need to add your TestProject to any inpath, and you can use javac. But you must configure the application for LTW at runtime.
EDIT
To answer your comment below:
Yes. First, you can compile the aspect design using ajc or the iajc task. You can then compile your second, clean Java project using the iajc task as well and, in addition, putting the results of your first project on the aspect path. You cannot use javac for this at all.
The ant build.xml snippet will look something like this:
<project name="simple-example" default="compile" > <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"> <classpath> <pathelement location="${home.dir}/tools/aspectj/lib/aspectjtools.jar"/> </classpath> </taskdef> <target name="compile" > <iajc sourceroots="${home.dir}/TestProject-Aspects/src" classpath="${home.dir}/tools/aspectj/lib/aspectjrt.jar" destDir="${home.dir}/TestProject-Aspects/bin"/> <iajc sourceroots="${home.dir}/TestProject/src" classpath="${home.dir}/tools/aspectj/lib/aspectjrt.jar" destDir="${home.dir}/TestProject/bin" aspectPath="${home.dir}/TestProject-Aspects/bin"/> </target> </project>
See iajc here for more iajc :
http://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html