> Howver, once I include this line code : IJ.runPlugin("ig.plugin.Conectivity", "") It doesn't work giving the error : Plugin or class not found " ig.plugin.Conectivity "
That is because you have to include the package that contains the Connectivity class. It's like an address which helps Java find the right code to run.
http://en.wikipedia.org/wiki/Java_package
All of BoneJ's packages are listed in its plugins.config file, which you can red by extracting the BoneJ_.jar (it's just a zip file), or by looking here:
https://github.com/mdoube/BoneJ/blob/master/src/plugins.config
So you see that Connectivity is at org.doube.bonej.Connectivity and your macro command should be
IJ.runPlugin("org.doube.bonej.Connectivity", "");
The org.doube top level is there because I hadn't yet registered
bonej.org when the project started. One of the jobs for BoneJ is to move packages into org.bonej.
Michael