Deployment
The process of installing your extensions in MotiveWave™ is referred to as ‘Deployment’. There are essentially two use cases for deploying extensions:
Development – As you are coding your extension, you will want to deploy your changes to MotiveWave™ so you can test your changes.
Distribution – When you have completed development you will want to package your extensions and make them available to other users.
Packaging
You may distribute your extensions by providing the .class (and .properties) files directly to your customers but you may find this awkward if you have more than one.
The preferred way to distribute these files is to package them together in a Jar (Java ARchive) file. This is a standard Java mechanism for distributing Java libraries or applications. If you would like to know more about this format you can visit this website address: http://java.sun.com/developer/Books/javaprogramming/JAR/
The sample Eclipse project includes the ability to create a Jar file for distribution in the ANT build script. You may also use the deployment features of Eclipse to create your Jar file.
Loading Extensions
MotiveWave™ will dynamically load extensions from the directory ‘MotiveWave Extensions’. This directory is created by MotiveWave™ when it first starts. Depending on the environment you have, it will be found:
Windows – C:\Documents and Settings\<username>\MotiveWave Extensions
Mac OSX - /Users/<username>/MotiveWave Extensions
This directory is searched (recursively) for the following types of files:
JAR Files (.jar) – These are essentially ‘zip files’ that contain .class and .properties files
Class Files (.class) – These files are generated by the javac compiler. Note: you must preserve the directory structure when copying these files into the ‘MotiveWave Extensions’ directory. For example classes in the ‘study_examples’ package must be put in the ‘MotiveWave Extensions\study_examples’ directory.
Properties Files (.properties) – These files contain the translatable text that has been separated from the code (see section on Internationalization). Similar to the class files, you must preserve the directory structure when copying these files into ‘MotiveWave Extensions’ directory.
‘.last_updated’ File |
If you look in the ‘MotiveWave Extensions’ directory (Note: this is a hidden file on Mac OSX) you will see a file called ‘.last_updated’. MotiveWave™ uses this file to determine is any of the files in this directory have been changed since its last scan. If you want to test your changes without restarting MotiveWave™, you will need to copy your changed files to ‘MotiveWave Extensions’ and then modify the timestamp on this file (for example using the Unix ‘touch’ command). The sample build.xml file (Apache ANT script) shows an example of how to modify this file to get MotiveWave™ to reload extensions. |
Third-Party Libraries (jars)
Starting with version 5.4.21 third-party libraries (jar files) can now be used in the SDK. These jar files must be added in the ext subdirectory of the MotiveWave Extensions directory. On startup of MotiveWave, all jar files in this subdirectory will be added to the class path. If any jar files are added or modified in this directory, MotiveWave will need to be restarted to pick up the new changes.
The screen shot below shows an example of third-party libraries added to the ext directory in the Motive Wave Extensions.
Last updated