Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] Need to get plug-in path

Hi,

I need to include a jar file from our plugin in the classpath Container.

For this I need to know the absolute path of our plugin on the user's
machine. How can I do it?


In Eclipse 3.0.x the following worked:

Bundle bundle = Platform.getBundle("plugin name");
bundlePaths = bundle.getLocation().split("@");
path = new Path(bundlePaths[1] + "my.jar");
JavaCore.newLibraryEntry(path,null,null)

In Eclipse 3.1:
The above does not work because getLocation90 returns relative path and not
absolute path. The reason is that
ConfigurationActivator.getBudlesToInstall() is now storing relative paths
instead of absolute path.

newLibraryEntry(path, null, null) expects abs path, so its assertion fails.

Thanks and regards,

Janak



-----------
Janak Mulani
Canoo Engineering AG
web: www.canoo.com
email: janak.mulani@xxxxxxxxx
tel: +91 98200 91274

ULC: Rich Internet Applications for J2EE
www.canoo.com/ulc



Back to the top