How to bring execution path till that exe???
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   eclipse_programmer
Posted On:   Wednesday, December 26, 2007 02:18 AM

Hello,


If my plugin jar file contains any file or exe.

This jar file is placed in plugins folder.

can i execute any command from that file.And how????

I mean how to bring execution path till that file.???



OR


How to extract that file from jar file using API????

Re: How to bring execution path till that exe???

Posted By:   Anonymous  
Posted On:   Tuesday, January 8, 2008 11:52 PM

public IPath getPluginFolder()
{
URL url = Platform.getBundle().getEntry("/");
try
{
url = FileLocator.resolve(url);
}
catch(IOException ex)
{
ex.printStackTrace();
}
return new Path(url.getPath());
}

To this Path add your jar file name and fetch the .exe using JarLoader. And execute it using Runtime.getRuntime().exec method.
About | Sitemap | Contact