Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » org.eclipse.core.runtime.applications(Question about Eclipse applications)
icon5.gif  org.eclipse.core.runtime.applications [message #734143] Thu, 06 October 2011 20:46 Go to next message
Shawn L. Pecze is currently offline Shawn L. PeczeFriend
Messages: 42
Registered: July 2009
Member
I'm not sure if this is the correct forum for this, but here goes.

I have an eclipse application that works fine in the workbench. I want to add a command line interface to build our type of projects. So, I created an application extension point using org.eclipse.core.runtime.applications.

I defined a class that implements IApplication.

I can run the application in the debugger by creating an eclipse configuration and selecting my application.

However, when I try to run my application from the command line, I get the following error:

java.lang.RuntimeException: Application "com.mycompany.myapp" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director.app.application, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.metadata.generator.EclipseGenerator, 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.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.ui.ide.workbench, org.eclipse.update.core.standaloneUpdate, org.eclipse.update.core.siteOptimizer, org.eclipse.ant.ui.antRunner, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

I tried creating a copy of eclipse.exe and calling in mycli.exe. I created mycli.ini and here is the contents:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
-application
com.mycompany.myapp
-data
c:\temp\mytempworkspace
-noSplash
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx512m
-Declipse.application.registerDescriptors=true

Am I doing something wrong?
Re: org.eclipse.core.runtime.applications [message #734147 is a reply to message #734143] Thu, 06 October 2011 21:06 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 501
Registered: July 2009
Senior Member
There are a few sanity checks you should do.

1) Is your bundle installed which contains the extension for org.eclipse.core.runtime.applications?
2) Is that bundle also resolved?

start with:

eclipse -console -noexit

Run the "ss" command to get the list of bundles. Check that your bundle is installed and in the RESOLVED state. If your bundle is installed but not RESOLVED then run the diag <your bundle id> command to see why it is not resolved.

Tom.
Re: org.eclipse.core.runtime.applications [message #734342 is a reply to message #734147] Fri, 07 October 2011 13:59 Go to previous messageGo to next message
Shawn L. Pecze is currently offline Shawn L. PeczeFriend
Messages: 42
Registered: July 2009
Member
Ok...I tried that and I don't see my bundle listed. When I run the diag command, it says the bundle couldn't be found.
Re: org.eclipse.core.runtime.applications [message #734374 is a reply to message #734342] Fri, 07 October 2011 14:55 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 501
Registered: July 2009
Senior Member
I'm not sure how you are provisioning your application to the eclipse installation. The root issue is that your bundle is not getting installed into the eclipse installation which you are trying to use to launch your application.

Tom
Re: org.eclipse.core.runtime.applications [message #734392 is a reply to message #734374] Fri, 07 October 2011 15:58 Go to previous message
Shawn L. Pecze is currently offline Shawn L. PeczeFriend
Messages: 42
Registered: July 2009
Member
I guess my question is, why are my plugins found when my Workbench application runs, but when I try to run my application, the plugins aren't found.

When I run from the -console -noexit, i can do an install file:///path to my plugin jar. It gets loaded then.

I've seen information about a bundles.info file. It seems I need to tell osgi to load my bundles explicitly?
Previous Topic:Declarative Services and NoClassDefFoundError
Next Topic:bundles.info
Goto Forum:
  


Current Time: Mon Nov 29 05:04:35 GMT 2021

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

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

Back to the top