[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] Integrating plugin bundles in normal Java

Hi experts,

I have been trying to start an osgi application with another POJO main method for integration.

I used the following in the main method of a public static main method:
public static void main(String[] args) {
String[] launcherArgs = {
"-configuration",
"C:\\pathTto\\configuration",
"-install",
"C:\\pathToIntall",
"-DJavaAgentLogConfigFile=C:\\pathToLogConfig\\log4j-commandline.xml",
"-application",
"org.my.Application",
};
org.eclipse.core.launcher.Main.main(launcherArgs);
}
The above class can be found in startup.jar.


However, now my problem is how to return an result object from my App A. org.eclipse.core.launcher.Main.main(launcherArgs) and org.eclipse.equinox.launcher.Main.main(launcherArgs) does not have return type. If my app A which implements org.eclipse.core.runtime.IPlatformRunnable does return an result object in its public Object run(args) method, how do I retrieve it?

I tried cutting over to use EclipseStarter:
     BundleContext context = EclipseStarter.startup(launcherArgs, null);
      Object appResult = EclipseStarter.run(null);

However, I think I am not able to use the same configuration parameters as before:
!ENTRY org.eclipse.osgi 4 0 2009-01-09 16:02:58.719
!MESSAGE Bundle org.eclipse.core.runtime@start not found.


!ENTRY org.eclipse.update.configurator 2009-01-09 16:02:58.859
!MESSAGE C:\pathTo\plugins is not a valid plugins directory.

Any idea?

Regards,
Tom