Summary
This recipe shows how to create and install from scratch a Meandre component written in Java using Eclipse
, and the Meandre Eclipse plugin
.
Step by step
- Download and install Eclipse
. - Install the Meandre Eclipse plugin
. Check the preferences configuration for the plugin
. - Start Eclipse and create a new Java project for your components

and enter the required information in the dialog box

- Create a new lib folder by clicking

and entering the information in the form

- Download the Meandre server jar
and copy the file to the lib directory that you created in the previous step.

- Go back to Eclipse and refresh the lib folder

After the refresh, the jar should show under the lib folder. - Add the jar to the build path by clicking

Once added, you should see it under "Referenced Libraries".

- Create a new class by clicking

and entering the relevant information in the form.

Meandre components are identified by implementing the ExecutableComponent interface (as shown above). When done completing the form, just click finish and a new class will show up in the project tree (see below).

- Code the component to do something useful like counting the length of a string.
You can find more information about the annotations used to define a Meandre component by visiting this page
. - Upload the component to the server by clicking install

and wait for the progress bar to finish.

The Meandre server must be running before invoking "Install Component". If you do not know how to start it, please check the recipe How can I quickly get a Meandre server up and running?. - To check that everything when OK, open the Meandre view

select the Meandre component view on the dialog box

and then click the refresh button on the view.

You should see you new component ready to rock on the server's list.
Labels:
None
Add Comment