Posted: Tue Feb 22, 2005 7:44 pm Post subject: Java Plugin Node
Newbie
Joined: 16 Feb 2005 Posts: 8
All,
In an effort to understand and implement a simple java plugin node, I wrote a simple java code and was able to compile it successfully. I am definitely sure that I am doing something wrong but am unsure about what
Steps I performed:
1) Created a Message flow Plugin node Project with Category as "Test" and Project Name as "com.ibm.test". Choose the default properties in the "Plug in Project Structure" and opted for "Create a blank plug-in project" in "Plug-in Code Generators view"
2) I can see the "com.ibm.test" in the package explorer. Added the External Jar file "<install-dir>/classes/jplugin". The Build Output Folder is set as "com.ibm.test/bin".
3) I created the "com.ibm.testpack" package and copied my *.java file manually in the "<workspace>\com.ibm.test\src\com\ibm\testpack" directory.
4) I compiled the java file manually by entering the command
jar -cvf TestNode.jar <workspace>/com.ibm.test/src/com/ibm/testpack/
. As both the *.Java file and *.Class file are in the same directory both were added the jar file. Content of Jar file
Code:
TestNode.Java
TestNode.Class
Manifest.mf
6) I copied the jar file into the <install-dir>/jplugin directory
I got little confused as what to do at this stage and I ended up performing the below steps
7) I copied the complete "com.ibm.test" from <workspace> to "<install-dir>/eclipse/plugins/."
8 ) I stopped the broker and restarted. At this stage I can see the "Category" but I dont see any nodes listed under that.
here is how my plugin.xml look like
Code:
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="com.ibm.test" name="com.ibm.test" version="1.0.0">
<!--This is a generated file.-->
<!--User modifications to this section will not be preserved.-->
<requires>
<import match="equivalent" plugin="com.ibm.etools.mft.api" version="5.0.0"/>
<import match="equivalent" plugin="com.ibm.etools.mft.uri" version="5.0.0"/>
<import match="equivalent" plugin="org.eclipse.help" version="2.0.2"/>
<import match="equivalent" plugin="org.eclipse.ui" version="2.0.2"/>
<import match="equivalent" plugin="org.eclipse.swt" version="2.0.2"/>
</requires>
<runtime>
<library name="test.jar"/>
</runtime>
<!--This is a generated file.-->
<!--User modifications to this section will not be preserved.-->
<extension point="org.eclipse.help.contexts">
<contexts name="HelpContexts.xml"/>
</extension>
<!--This is a generated file.-->
<!--User modifications to this section will not be preserved.-->
<extension point="com.ibm.etools.mft.api.nodes"/>
<!--This is a generated file.-->
<!--User modifications to this section will not be preserved.-->
<extension point="com.ibm.etools.mft.uri.pluginspace"/>
</plugin>
Any help is highly appreciated. Thanks in advance.
you have to do a bit more than copying a class file to message brokers jplugin directory.
You find some examples by reading following redbook : http://www.redbooks.ibm.com/redbooks/SG246579.html or by checking the online documentation.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum