Jtest logo




Contents  Previous  Next  Index

Using dbc_javac with Ant


To use dbc_javac (instead of javac) with Apache's Jakarta Ant build tool.

  1. Modify the CLASSPATH environment variable to include 'jcontract.jar' and 'antlr.jar'. These files are in <jcontract_installation_dir>/bin.
  2. Modify your Ant project's xml file to include the following property inside the project:

    <property name="build.compiler" value="com.parasoft.dbc.AntDbcJavac"/>

    A simple yet complete build file using dbc_javac instead of javac follows:
 
 <project name="SampleProject" default="compile" basedir=".">
 <!-- set this build to use dbc_javac instead of javac -->
 <property name="build.compiler" value="com.parasoft.dbc.Ant-
DbcJavac"/>
 <target name="compile">
 <!-- Create the time stamp -->
 <tstamp/>
 <!-- Compile the java code -->
 <exec dir ="${basedir}" executable="${JCONTACT_HOME}/
bin/dbc_javac.exe">
 <arg line= "(Path to the users .java files)" />
 </exec>
 </target>
 </project>
 
  1. Ensure that 'ant.jar' is in your CLASSPATH environment variable.

Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft