Case 1: Your product is a Java application
Assuming that the reporting file is the binary of the Java application, you should run this code in
main
or somewhere else:
ChiffonUpdaterTool updaterTool = new ChiffonUpdaterTool(false);
if (updaterTool.initialize()) {
try {
updaterTool.registerProgram(
new File(this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI()));
} catch (URISyntaxException e) {
// You can choose to let this like this or handle the error your way.
}
}
If needed, you can also check the Javadoc of the ChiffonUpdaterTool class. In the case the piece of software
which runs this code isn't the reporting file, do this instead:
File reportingFile = ....;
ChiffonUpdaterTool updaterTool = new ChiffonUpdaterTool(false);
if (updaterTool.initialize()) {
updaterTool.registerProgram(reportingFile);
}
Case 2: Your product is not a Java application
In the case your application is not a Java application, it should run a command such as:
java -Dcuwrapper.command=regbin -Dcuwrapper.binaryFile="<absolute path of the reporting file>" -Dcuwrapper.logOnConsole=false -jar "<absolute path of the external library>"
Here,
java could be from any Java Runtime Environment (JRE).
You can also choose to enable console logging by chaning
-Dcuwrapper.logOnConsole=false to
-Dcuwrapper.logOnConsole=true
For a full list of options of the external library, check
the technical documentation page on run options