开发者

Starting Eclipse RCP from within Java code

开发者 https://www.devze.com 2022-12-10 21:09 出处:网络
I would like to start a Eclipse RCP 3.x application from within Java code. I need to do this because I need to launch the RCP app from within a framework, that needs to be initialized first.

I would like to start a Eclipse RCP 3.x application from within Java code. I need to do this because I need to launch the RCP app from within a framework, that needs to be initialized first.

To have access to this other framework (which is SAP NetWeaver Mobile by the way), both applications need to run in the same JVM - therefore I can not call the .exe to start the RCP application. Within RCP I need开发者_运维知识库 to access the SAP framework.

Any help would be welcome.

Thanks in advance and best regards, alex


You can take a look at what the .exe does:

eclipse.c

Basically, it starts the VM with this jar: org.eclipse.equinox.launcher_xxx.jar and execute its org.eclipse.equinox.launcher.Main class


Look at the EclipseStarter class. I think you need to get the Equinox framework Jar file and have it be in your classpath to use this. That's called org.eclipse.osgi. If you have a situation where you are providing an API in your Java class to call into classes managed by Eclipses the situation gets considerably more complicated. Make a comment on this if that's the case and I can provide some information there.

0

精彩评论

暂无评论...
验证码 换一张
取 消