Creating a DTK Plugin
To create and commit a DTK plugin:Â
Create the different Java files required for the type of plugin you want to create. See the chapters describing each plugin for further information.
Compile all the Java files for your plugin into classes:
> javac -classpath $CLASSPATH com/mycompany/myagent/*.java
Caution!
Do not use the default package context in the Java code. All classes in MediationZone must have unique names.
Create a user-defined *.jar file containing the classes, see Creating a DTK Plugin | Creating a User Defined Jar below.
Create a user-defined *.mzp package containing the *.jar file, see Creating a DTK Plugin | Creating a User Defined Package below.
Commit your user-defined package, see Creating a DTK Plugin | Committing a User Defined Package below.
Creating a User-Defined Jar
To create a *.jar file containing the classes, use the following command syntax:
> jar cvf my_agent.jar com/mycompany/myagent/*.class
It is also possible to add resources to a jar file, just append any resource name to your "jar create" command. This allows you to, for instance, add images that your class depends on to the jar:
> jar cvf my_agent.jar com/mycompany/myagent/*.class com/mycompany/myagent/myagent_icon.svg
Creating a User-Defined Package
In order to insert the *.jar file into Global variable macro (Development), a package containing the jar file must first be created. A package gives the *.jar file a name and a version. The mzsh pcreate
command creates a code package used for composing packages (.mzp)
in order to create additional functionality and updates. The name and version will be visible in the About window once the new package has been committed into the system.
A package is created using the pcreate
command in the mzsh Command Line Tool:
Committing a User-Defined Package
Â