Running the Catalog API Samples
The sample programs, TestCatalogAPI.java and TestCatalogBV.java in <install_root>\help\samples\APICatalog
, show how you can use the Catalog API to create a catalog and to create business views in a catalog. This topic describes how you can compile and run the sample programs.
In order to compile and run the Catalog API samples, you should add the required classes to the class path (make sure that the path of the file JREngine.jar is before that of the file report.jar).
For example, you can use the following command to compile and run the sample program TestCatalogAPI.java. After you run the program, it creates a new catalog file MyReports.cat in C:\LogiReport\Designer\Demo\MyReports
. Be sure to create this empty directory first.
C:\LogiReport\Designer\help\samples\APICatalog>javac -classpath "C:\LogiReport\Designer\lib\JREngine.jar;C:\LogiReport\Designer\lib\sac-1.3.jar;C:\LogiReport\Designer\lib\report.jar;C:\LogiReport\Designer\lib\log4j-core-2.13.3.jar;C:\LogiReport\Designer\lib\log4j-api-2.13.3.jar;C:\test\classes" TestCatalogAPI.java
C:\LogiReport\Designer\help\samples\APICatalog>java -classpath "C:\LogiReport\Designer\lib\jrengine.jar;C:\LogiReport\Designer\lib\sac-1.3.jar;C:\LogiReport\Designer\lib\report.jar;C:\LogiReport\Designer\lib\log4j-core-2.13.3.jar;C:\LogiReport\Designer\lib\log4j-api-2.13.3.jar;C:\LogiReport\Designer\help;C:\test\classes" -Dreporthome=C:\LogiReport\Designer TestCatalogAPI -path=C:\LogiReport\Designer\Demo\MyReports -catalog=MyReports.cat -log=C:\LogiReport\Designer\logs\designer.log