Running Eclipse RCP applications in IntelliJ 2017 Part 2
Hi, all!
I've created sample Eclipse RCP application with Eclipse Neon and import it to intelliJ IDEA Ultimate 2017.1.3 (EAP).
I set up OSGi Framework to my Neon installation and add plugins directory as a library. After that, I've add this library as a
compile dependency to the main module. Defined OSGI facet and set manifest reference to my Eclipse-made MANIFEST.MF.
After that I've build project without any error. Created new launch configuration upon OSGi template with my bundle and some eclipse
ones as described here: http://wiki.eclipse.org/Eclipse4/RCP/FAQ#Why_won.27t_my_application_start.3F
got error with this stacktrace (a lot of "unresolved" messages skipped):
!ENTRY org.eclipse.osgi 4 0 2017-06-06 11:55:26.002
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:216)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:65)
What did I've done wrong? How to get it work? I'd greatly appreciate if someone could take the time to help me out! :)
Any hint is highly appreciated.
Source code placed here: https://github.com/k-groshev/eclipse-rcp-iin-idea-demo.git
请先登录再写评论。
Is it possible to start the project from Eclipse and get the full command line?
One note - the module depends on the whole Eclipse (via the library "plugins"). Because of that, you don't need to explicitly add the "org.eclipse.core.runtime" to the list of bundles - it happens automatically.
Yes, it is possible. In Eclipse application run normally. Command line there looks like this:
"C:\Program Files\Java\jdk1.8.0_73\bin\javaw.exe" -Dfile.encoding=Cp1251 -classpath C:\Symtavision\eclipse-rcp-neon-win32-x86_64_all\plugins\org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar org.eclipse.equinox.launcher.Main -launcher C:\Symtavision\eclipse-rcp-neon-win32-x86_64_all\eclipse.exe -name Eclipse -showsplash 600 -product net.groshev.rcp.product -data C:\Users\kgroshev\workspace_test/../runtime-net.groshev.rcp.product -configuration file:C:/Users/kgroshev/workspace_test/.metadata/.plugins/org.eclipse.pde.core/net.groshev.rcp.product/ -dev file:C:/Users/kgroshev/workspace_test/.metadata/.plugins/org.eclipse.pde.core/net.groshev.rcp.product/dev.properties -os win32 -ws win32 -arch x86_64 -nl en_US -consoleLog -clearPersistedState
I see, thanks. The command is completely different from what IDEA produces.
So, at the moment IDEA (more exactly, Osmorc plugin) does not support RCP apps.
Is it a restriction on an Eclipse version? I mean, will it work for the previous version of RCP platform?
And is it possible to get it work with Osmorc plugin in foreseen future?
Don't think so (though I don't know enough about RCP). The settings in a run configuration affect a couple of properties - that doesn't seem to be enough.
There are plans on improving the plugin but, unfortunately, I won't be able to start working on it earlier than next year.