Execute JAR

A JAR file is a type of compressed file, which is actually using the same compression algorithms and format as ZIP files.

JAR files normally contain a number of Java Classes and some metadata (a manifest file). Java classes are part of applications which are written in Java.

This feature helps administration to create its own classes, packaged into JAR file and execute from OpenKM.

Examples of usage:

  • When administrator wants to do some operation across all repository that take effect on a lot of nodes, based on some logic or special conditions. Can take advantage building minimal code with OpenKM API for it. Some examples could be, change security, remove or move files, rename files based on their metadata values, among others.
  • Check crontab task.

Requisits:

  • Must implement the class "public static void main(String[] args)".
package com.openkm;

public class CronTabTest {
    public static void main(String[] args) {
        // Some stuff here
    }
}