How to write a plugin
Posted: Fri Jul 02, 2004 10:23 am
Hi,
I'm using the standalone version of oxygen 4 under linux and tried to write a simple Plugin (called HtmlToXsl). (No Eclipse, no oxygen eclipse-plugin).
I got the documentation from this site (pdf) and created the structure as told:
oxygen/plugins/HtmlToXsl, copied and changed the plugin.xml from the Comment-Plugin, created lib and lib/htmltoxsl and 2 Java-Files in there:
1 for the HtmlToXslPlugin and for the HtmlToXslPluginExtension.
I used the code from the comment plugin out of the documentations and added a simple
import ro.sync.exml.plugin.*; to HtmlToXslPlugin.java, and
import ro.sync.exml.plugin.selection.*; to HtmlToXslPluginExtension.java.
So far: I'm able to compile it (with -classpath /opt/oxygen/lib/oxygen.jar) and get the class-files - no errors, no warnings - and created the jar.
When I start Oxygen I get the message:
java.lang.NoClassDefFoundError
/opt/oxygen/plugins/HtmlToXsl - htmltoxsl/HtmlToXslPluginExtension (wrong name: HtmlToXslPluginExtension)
There are no mis-spells (upper-lower-case), I checked it several times and even copied the text out of the text-console from the path.
Any ideas? BTW: Java is not my favorite language; call me a beginner in java.
Are there any code templates for creating SelectionPlugins (maybe I forgot something in my java-files).
Greetings
Kassi
I'm using the standalone version of oxygen 4 under linux and tried to write a simple Plugin (called HtmlToXsl). (No Eclipse, no oxygen eclipse-plugin).
I got the documentation from this site (pdf) and created the structure as told:
oxygen/plugins/HtmlToXsl, copied and changed the plugin.xml from the Comment-Plugin, created lib and lib/htmltoxsl and 2 Java-Files in there:
1 for the HtmlToXslPlugin and for the HtmlToXslPluginExtension.
I used the code from the comment plugin out of the documentations and added a simple
import ro.sync.exml.plugin.*; to HtmlToXslPlugin.java, and
import ro.sync.exml.plugin.selection.*; to HtmlToXslPluginExtension.java.
So far: I'm able to compile it (with -classpath /opt/oxygen/lib/oxygen.jar) and get the class-files - no errors, no warnings - and created the jar.
When I start Oxygen I get the message:
java.lang.NoClassDefFoundError
/opt/oxygen/plugins/HtmlToXsl - htmltoxsl/HtmlToXslPluginExtension (wrong name: HtmlToXslPluginExtension)
There are no mis-spells (upper-lower-case), I checked it several times and even copied the text out of the text-console from the path.
Any ideas? BTW: Java is not my favorite language; call me a beginner in java.
Are there any code templates for creating SelectionPlugins (maybe I forgot something in my java-files).
Greetings
Kassi