Execute JAR

A JAR file is a type of compressed file which actually uses 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 written in Java.

This feature helps administrators create their own classes, package them into a JAR file, and execute them from OpenKM.

Examples of usage:

  • When an administrator wants to perform some operation across the entire repository that affects many nodes, based on some logic or special conditions, they can build minimal code using the OpenKM API for it. Examples include changing security, removing or moving files, and renaming files based on their metadata values, among others.
  • Check the crontab task.

Requirements:

  • 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
    }
}
Table of contents [ Hide Show ]