Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Can not start my plugin from CL(My simple plugin will not launch when I am using the CL)
Can not start my plugin from CL [message #1815428] Wed, 02 October 2019 16:27 Go to next message
Hugo Maier is currently offline Hugo MaierFriend
Messages: 8
Registered: October 2019
Junior Member
Hello,

I am pretty new to RCP plugins with eclipse.
When i created my plugin with the eciplse plugin-wizard everything worked fine. It runs good inside eclipse.
Then I exported the project and put the jar-file into the eclipse plugin folder and I tried to launch the application with
eclipsec -application com.eclipse.hello.application.application
but i always got these error message:


!SESSION 2019-10-02 18:00:57.966 -----------------------------------------------

eclipse.buildId=4.13.0.I20190916-1045

java.version=1.8.0_221

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

Framework arguments:  -product org.eclipse.epp.package.rcp.product -application com.eclipse.hello.application.application

Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.rcp.product -application com.eclipse.hello.application.application

 

!ENTRY org.eclipse.epp.logging.aeri.ide 2 0 2019-10-02 18:01:09.219

!MESSAGE Could not resolve module: org.eclipse.epp.logging.aeri.ide [166]

  Unresolved requirement: Import-Package: org.apache.lucene.document; version="[7.1.0,8.0.0)"

 

 

!ENTRY org.eclipse.osgi 4 0 2019-10-02 18:01:09.224

!MESSAGE Application error

!STACK 1

java.lang.RuntimeException: Application "com.eclipse.hello.application.application" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.touchpoint.natives.nativePackageExtractor, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.oomph.p2.core.RepositoryIntegrityAnalyzer, org.eclipse.oomph.p2.core.P2Indexer, org.eclipse.oomph.setup.core.SetupArchiver, org.eclipse.pde.api.tools.apiAnalyzer, org.eclipse.pde.build.Build, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication, org.eclipse.swtbot.eclipse.core.swtbottestapplication, org.eclipse.ui.ide.workbench.

               at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:252)

               at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:33)

               at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)

               at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)

               at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)

               at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)

               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

               at java.lang.reflect.Method.invoke(Unknown Source)

               at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)

               at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)

               at org.eclipse.equinox.launcher.Main.run(Main.java:1468)

 


If i read that correct, the " Import-Package: org.apache.lucene.document" package is missing, or is it something else? I searched for hours on the web and i can not find these package. And my plugin is not found as well. I am using eclipse 2019-09 on Windows.
How can i run my plugin from the commandline?

Any help is welcome.

Re: Can not start my plugin from CL [message #1815528 is a reply to message #1815428] Fri, 04 October 2019 09:12 Go to previous messageGo to next message
Hugo Maier is currently offline Hugo MaierFriend
Messages: 8
Registered: October 2019
Junior Member
I was able to run my RCP application with the CL:

.
java -jar  C:\Users\hm\.p2\pool\plugins\org.eclipse.equinox.launcher_1.5.500.v20190715-1310.jar -application com.eclipse.hello.application -data C:\Users\hm\eclipse3\eclipse-workspace -configuration file:C:/Users/hm/eclipse3/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/com.eclipse.hello.application/ -dev file:C:/Users/hm/eclipse3/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/com.eclipse.hello.application/dev.properties



I tried exporting my RCP plugin, so that it can be run with less options, but that did not worked. I have read several guides, but they seemed all a bit outdated.
Can someone name an actual guide how to export a simple RCP plugin so that it can be run from the CL? Or do I have to make it a product, to execute it?

Any help is really appreciated
Re: Can not start my plugin from CL [message #1815773 is a reply to message #1815528] Thu, 10 October 2019 10:30 Go to previous message
Hugo Maier is currently offline Hugo MaierFriend
Messages: 8
Registered: October 2019
Junior Member
I am now able to run my plugin from the command line, but now i encountered another problem. The plugin is build to import projects into eclipse with the commandline. When i have eclipse running i used the commandline to execute my plugin and it is creating and opening the projects, but they are not shown in the project explorer.

IWorkspace workspace = ResourcesPlugin.getWorkspace();
                IProjectDescription description = workspace.loadProjectDescription(
                        new Path(projectFile.toString()));
                IProject project = workspace.getRoot().getProject(description.getName());
                if (project.isOpen() == false) {                	
                	project.create(description, null);
                        project.open(null);                    
                       workspace.getRoot().refreshLocal(IWorkspaceRoot.DEPTH_INFINITE, null);
               else
                   System.out.println("Allready open");


I know that they are open, because if i run the CL again the programm moves to the else branch. Which command can be used to show the projects in the projectexplorer?

Any help is welcome.
Previous Topic:Eclipse RCP + OpenjDK 11 + Openjfx
Next Topic:Minimal stand-alone help system does not show my help plugin
Goto Forum:
  


Current Time: Thu Mar 28 14:25:03 GMT 2024

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

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

Back to the top