Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Invoke an eclipse plugin from a Java application
Invoke an eclipse plugin from a Java application [message #1014977] Wed, 27 February 2013 05:24 Go to next message
Innovator CSE is currently offline Innovator CSEFriend
Messages: 6
Registered: February 2013
Junior Member
Hi..
I have developed an eclipse plugin. I want to access this plugin from a Java application. Is it possible? Am I proceeding in the right direction? If so, how can I do it? Please do reply even if you feel the question is stupid. I need a quick answer if this can be done or not. I Googled it and came to know that the plugin and the Java program run on separate JVMs. Is it possible to access the plugin i.e. invoke the plugin from within the java program?

[Updated on: Wed, 27 February 2013 11:23]

Report message to a moderator

Re: Invoke an eclipse plugin from a Java application [message #1015129 is a reply to message #1014977] Wed, 27 February 2013 14:34 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
You will have to be more specific about what you mean by invoking the plugin. Plugins are just Java code, so the classes that make up a plugin can be accessed by any Java application. If you expect the standard plugin initialization to have run prior to invoking the code, then you will at a minimum have start the OSGI Framework in the Java application to get things setup.
Re: Invoke an eclipse plugin from a Java application [message #1015521 is a reply to message #1015129] Fri, 01 March 2013 05:14 Go to previous messageGo to next message
Innovator CSE is currently offline Innovator CSEFriend
Messages: 6
Registered: February 2013
Junior Member
Thank you. I developed an RCP application and managed to call the plugin from it. But now I have another issue. I have to access an so file within the project folder. I have loaded the library using System.loadLibrary() but unless the library is in /usr/lib directory, the .so files is not at all getting accessed. Is there any way to access the so file from the project folder so that when I export the plugin, the so is also exported and the end user can use the plugin without any changes? Even if I load the library using System.load() and specify the full path to the so file, it is not getting accessed. Is there any way to do it?
Re: Invoke an eclipse plugin from a Java application [message #1015677 is a reply to message #1015521] Fri, 01 March 2013 16:33 Go to previous message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
The OSGI framework which underlies Eclipse provides tools to load system native libraries in plugins (OSGI calls them bundles). Here is a link to an article discussing how to use the support I found after a quick Google search.

http://holistictendencies.wordpress.com/2011/03/28/bundle-nativecode-using-platform-specific-dlls-from-osgi/
Previous Topic:Remove Lines Changed Markers?
Next Topic:Programmatically export plugin
Goto Forum:
  


Current Time: Fri Apr 19 16:00:55 GMT 2024

Powered by FUDForum. Page generated in 0.01274 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top