The integration of the JAR in the library can be achieved through the proposal in your questions.
1) Import of files to the libraryThe import of the JAR in the library can be achieved by adding the file to the library following the video tutorial available online here:
https://www.youtube.com/watch?v=ILI1FPyRMuI2) Running files from the Since the execution of the JAR using the AdoScript SYSTEM call needs to be done from the local file system, an "initialization" step is needed here, to prepare the file system accordingly. Different approaches are possible:
a) Copy the JAR file into the temporary folder of the Windows systemThis approach would mean that during each export, the JAR is written to the file system, executed, and then deleted again. The advantage is that always the most up-to-date executable is used during execution and no modification of the ADOxx installation is performed.
1CC "AdoScript" GET_TEMP_FILENAME
2#--> RESULT filename:strValue
3SETL sJARFilePath:(filename + ".jar")
4CC "AdoSript" FILE_COPY from: ("db:\\jarFileToCopy.jar") to: (sJARFilePath)
5# perform SYSTEM call, all interaction needed
6# ...
7# clean up temp folder
8CC "AdoScript" FILE_DELETE file: (sJARFilePath)
b) Copy the JAR during the initialization taskThis approach would copy the file ones during the initialization. Specific consideration is needed for updates (another startup of the tool) to clean/replace/ignore the already copied file. The same snipplet as of above can be used.
1ON_EVENT "AppInitialized" {
2 # returns the ADOxx installation directory
3 CC "Application" GET_PATH append-delimiter
4 SETL sJARFilePath: (path + "jarFile.jar")
5 # clean up, if existing
6 CC "AdoScript" FILE_EXISTS file: (sJARFilePath)
7 IF (exists) {
8 CC "AdoScript" FILE_DELETE file: (sJARFilePath)
9 }
10 # copy JAR to installation directory
11 CC "AdoSript" FILE_COPY from: ("db:\\jarFileToCopy.jar") to: (sJARFilePath)
12}
Further details on the AdoScript commands and events used in the code fragments are available in the AdoScript Online Documentation:
http://www.adoxx.org/live/adoscript-documentationc) Integration in the outcome productDuring compilation of the ADOxx-based product, the JAR can be added to the installation routine, and will be part of the product release. Using the product development service available online at http://www.adoxx.org/live/autopdp-packaging-service, add-on programs can be uploaded to be integrated in the build job.