The EmployeeRecord
class is generated by Cobol2Java in Unix, Linux or Windows systems on the basis of the XML file employee.xml
. The classes are generated by Ant, compiled, and packed in the JAR file employee.jar
, which can then be used as a basis for a BeanConnect client. You call Ant with the script runAnt
.
Detailed information on generation is provided in Generating Java classes on Unix, Linux or Windows systems .
Defining the configuration
Edit the parameter file cobol2java.properties
for Ant as follows:
xml.file=samples/employee.xml cobol.struct=EMPLOYEE-RECORD package.name=de.siemens.cob2java.test doc.dir=doc jar.dest=employee.jar code.convention=java
Setting the PATH variable
To enable runAnt
to run, it must be possible to call the Java programs javac
and javadoc
.
Extend your PATH
environment variable by adding the Java SDK program directory.
Starting generation
Switch to the Cobol2Java home directory.
Call
runAnt.sh
(Unix/Linux systems) orrunAnt.bat
(Windows systems).
During generation, the Java sources are created in the src
directory, compiled, and stored in the JAR file employee.jar
. The JavaDoc of the created classes can be found in the doc
directory.