Determine the location of the SCA contribution from the current class.

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@698798 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jsdelfino 2008-09-25 01:58:01 +00:00
parent 26f26e8141
commit 3913958f54

View file

@ -49,7 +49,8 @@ public class Activator extends AbstractUIPlugin {
plugin = this;
launcher = NodeLauncher.newInstance();
node = launcher.createNode("Calculator.composite", new Contribution("c1", new File("target/classes").toURI().toString()));
String location = getClass().getProtectionDomain().getCodeSource().getLocation().toString();
node = launcher.createNode("Calculator.composite", new Contribution("c1", location));
node.start();
}