What is this?
This is part of axCmdLineRun.java file from translator integration directory.
It is simplest Java code capable to load and run Cross Translator maps.
There are more advanced samples provided in integration directory under translator installation.
|
|
|
Translator SDK Usage Example
import com.etasoft.trans.transaction.axInputParameters;
import com.etasoft.trans.transaction.axTransactionRunner;
// ... some of your code here
try {
String mapFileName = "mymapfile_with_full_path.cmp";
axInputParameters inputParameters = new axInputParameters();
inputParameters.addOver(args, true);
// run map
axTransactionRunner runner = new axTransactionRunner(mapFileName, inputParameters);
runner.runMap();
System.out.println("COMPLETE");
}
catch (InterruptedException exp) {
System.out.println("Translation interrupted.");
}
catch (Throwable exp2) {
System.out.println("PROCESSING FAILED");
System.out.println("Error: " + exp2.getMessage());
}
|