简体   繁体   中英

Starting Eclipse RCP from within Java code

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM