Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » launch my eclipse RCP-APP just using Equinox not the EclipseStater
launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52580] Mon, 07 November 2005 13:05 Go to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

I was trying to find a way to launch my eclipse RCP-APP just using Equinox
not the EclipseStater. Is it possible?

I have watched the "Coding bundles on the Slug" demo movie, and I have
tried to launch a very simple RCP-APP(the Hello RCP of Eclipse) for test.

What I tried is:

Run org.eclipse.osgi in console mode, install and active all the necesary
bundles for the "Hello RCP plugin", but when I start the "Hello RCP
plugin", it appears nothing? Starting the bundles doésn't mean to launch
the plugin(RCP-APP)?

osgi> ss

Framework is launched.

id State Bundle
0 ACTIVE system.bundle_3.2.0
3 ACTIVE org.eclipse.ui_3.2.0
4 ACTIVE com.tgestiona.test.rcpplugin_1.0.0
5 ACTIVE org.eclipse.ui.workbench_3.2.0
6 ACTIVE org.eclipse.swt_3.1.0
Fragments=7
7 RESOLVED org.eclipse.swt.win32.win32.x86_3.1.0
Master=6
9 ACTIVE org.eclipse.jface_3.2.0
10 ACTIVE org.eclipse.core.runtime_3.1.0
11 ACTIVE org.eclipse.core.commands_3.2.0
12 ACTIVE org.eclipse.help_3.1.0
13 ACTIVE org.eclipse.core.expressions_3.1.0


I have also done a java program which do the some this, but it still
doesn't works. My questions are:

1). When a RCP-APP plugin is actived, it will be also lauched?
2). Or I have to do something more to launch it manuelly?
3). Some new idea for doing this diferently?

Thanx very much.
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52608 is a reply to message #52580] Mon, 07 November 2005 13:43 Go to previous messageGo to next message
Ricky is currently offline RickyFriend
Messages: 204
Registered: July 2009
Senior Member
> Run org.eclipse.osgi in console mode, install and active all the
> necesary bundles for the "Hello RCP plugin", but when I start the "Hello
> RCP plugin", it appears nothing? Starting the bundles doésn't mean to
> launch the plugin(RCP-APP)?

I thing there is a difference between the plugin and the application.
Starting the plugin will probably not search for an application extension
and launch it. So maybe you can call the run method of your application
directly within the start method of the plugin.

> 1). When a RCP-APP plugin is actived, it will be also lauched?

What is a RCP-APP plugin? Simply a plugin with an application extension?


> 2). Or I have to do something more to launch it manuelly?

Try to start the application in the start method of BundleActivator.

hth,

Ricky
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52689 is a reply to message #52608] Tue, 08 November 2005 11:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

> I thing there is a difference between the plugin and the application.
> Starting the plugin will probably not search for an application extension
> and launch it. So maybe you can call the run method of your application
> directly within the start method of the plugin.
I agree too.

> What is a RCP-APP plugin? Simply a plugin with an application extension?
Sorry, I wanted to say a RCP-APP.

> Try to start the application in the start method of BundleActivator.
Do you mean in the start method of BundleActivator of the RCP-APP?

Thank you very much, Ricky.

Sheng
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52714 is a reply to message #52608] Tue, 08 November 2005 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

> I thing there is a difference between the plugin and the application.
> Starting the plugin will probably not search for an application extension
> and launch it. So maybe you can call the run method of your application
> directly within the start method of the plugin.
I agree too.

> What is a RCP-APP plugin? Simply a plugin with an application extension?
Sorry, I wanted to say a RCP-APP.

> Try to start the application in the start method of BundleActivator.
Do you mean in the start method of BundleActivator of the RCP-APP?

Thank you very much, Ricky.

Sheng
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52741 is a reply to message #52714] Tue, 08 November 2005 12:45 Go to previous messageGo to next message
Ricky is currently offline RickyFriend
Messages: 204
Registered: July 2009
Senior Member
>> What is a RCP-APP plugin? Simply a plugin with an application extension?
> Sorry, I wanted to say a RCP-APP.

>> Try to start the application in the start method of BundleActivator.
> Do you mean in the start method of BundleActivator of the RCP-APP?

I dont quite understand your setup. So I tell you mine.

I have a plugin with an application extension. The plugin contains the
class Foo which implements org.eclipse.core.runtime.IPlatformRunnable. I
consider this class as the main entry point of an application.

Then there are some other plugins with the main domain logic of my
program. The sum of all plugins is my RCP application.

I interpret your term RCP-APP as an application with only one plugin which
contains the application extension. So if the RCP-APP should be started
when this single plugin is started, I would try to call the run method of
the IPlatformRunnable implementation (class Foo in my setup) within the
start method of the BundleActivator of this single plugin.

I hope this is understandable :)

Ricky
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52798 is a reply to message #52741] Thu, 10 November 2005 11:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

First thank you very much for your patience.

>I have a plugin with an application extension. The plugin contains
>the class Foo which implements
>org.eclipse.core.runtime.IPlatformRunnable. I consider this class
>as the main entry point of an application.
Either does the mine.

>Then there are some other plugins with the main domain logic of my
>program. The sum of all plugins is my RCP application.

>I interpret your term RCP-APP as an application with only one
>plugin which contains the application extension. So if the RCP-APP
>should be started when this single plugin is started, I would try
>to call the run method of the IPlatformRunnable implementation
>(class Foo in my setup) within the start method of the
>BundleActivator of this single plugin.
No, my RCP-APP is the same as yours, it contente a own .jar, and some
eclipse dependence plugins.

>I hope this is understandable :)
Totally understandable, thanx.

I tried to do as you said, put the RUN method into Bundle.start() like
this:
------- CODE -------
public void start(BundleContext context) throws Exception {
super.start(context);
Application app = new Application();
app.run(null);
}
------- END -------

This work only when I run the APP under Eclipse as an Eclipse Application,
but it throws the follows exceptions when I start all the plugins manuelly
with Exquinox(org.eclipse.osgi) console mode:

------------------------------------------------------------ --------
Framework is launched.

id State Bundle
0 ACTIVE system.bundle_3.2.0
3 ACTIVE org.eclipse.ui_3.2.0
5 ACTIVE org.eclipse.ui.workbench_3.2.0
6 ACTIVE org.eclipse.swt_3.1.0
Fragments=7
7 RESOLVED org.eclipse.swt.win32.win32.x86_3.1.0
Master=6
9 ACTIVE org.eclipse.jface_3.2.0
10 ACTIVE org.eclipse.core.runtime_3.1.0
11 ACTIVE org.eclipse.core.commands_3.2.0
12 ACTIVE org.eclipse.help_3.1.0
13 ACTIVE org.eclipse.core.expressions_3.1.0
14 RESOLVED com.tgestiona.test.rcpplugin_1.0.0

osgi> start 14
org.osgi.framework.BundleException: The activator
com.tgestiona.test.rcpplugin.A
ctivator for bundle com.tgestiona.test.rcpplugin is invalid
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleAct
ivator(AbstractBundle.java:147)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(Bund
leContextImpl.java:965)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
eHost.java:313)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
tBundle.java:262)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._st
art(FrameworkCommandProvider.java:232)
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.osgi.framework.internal.core.FrameworkCommandInt erpreter.
execute(FrameworkCommandInterpreter.java:145)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(F
rameworkConsole.java:293)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(Fra
meworkConsole.java:278)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(Framewo
rkConsole.java:213)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: The state indicates the bundle
is re
solved
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getR esolution
FailureMessage(AbstractBundle.java:1348)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
eHost.java:288)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
tBundle.java:262)
at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(Ec
lipseClassLoader.java:116)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(
BundleLoader.java:337)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
eLoader.java:389)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
eLoader.java:350)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass
(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(Bundl
eLoader.java:275)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleH
ost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleAct
ivator(AbstractBundle.java:133)
... 13 more
Nested Exception:
java.lang.IllegalStateException: The state indicates the bundle is resolved
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getR esolution
FailureMessage(AbstractBundle.java:1348)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
eHost.java:288)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
tBundle.java:262)
at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(Ec
lipseClassLoader.java:116)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(
BundleLoader.java:337)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
eLoader.java:389)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
eLoader.java:350)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass
(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(Bundl
eLoader.java:275)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleH
ost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleAct
ivator(AbstractBundle.java:133)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(Bund
leContextImpl.java:965)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
eHost.java:313)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
tBundle.java:262)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._st
art(FrameworkCommandProvider.java:232)
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.osgi.framework.internal.core.FrameworkCommandInt erpreter.
execute(FrameworkCommandInterpreter.java:145)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(F
rameworkConsole.java:293)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(Fra
meworkConsole.java:278)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(Framewo
rkConsole.java:213)
at java.lang.Thread.run(Unknown Source)
Nested Exception:
java.lang.IllegalStateException: The state indicates the bundle is resolved
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getR esolution
FailureMessage(AbstractBundle.java:1348)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
eHost.java:288)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
tBundle.java:262)
at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(Ec
lipseClassLoader.java:116)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(
BundleLoader.java:337)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
eLoader.java:389)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
eLoader.java:350)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass
(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(Bundl
eLoader.java:275)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleH
ost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleAct
ivator(AbstractBundle.java:133)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(Bund
leContextImpl.java:965)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
eHost.java:313)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
tBundle.java:262)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._st
art(FrameworkCommandProvider.java:232)
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.osgi.framework.internal.core.FrameworkCommandInt erpreter.
execute(FrameworkCommandInterpreter.java:145)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(F
rameworkConsole.java:293)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(Fra
meworkConsole.java:278)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(Framewo
rkConsole.java:213)
at java.lang.Thread.run(Unknown Source)

osgi>
------------------------------------------------------------ ---------

My mind is overflowed at this moment, thanx for any suggestion.


Sheng
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52822 is a reply to message #52798] Thu, 10 November 2005 13:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves.inf.no.spam.ufsc.br

According to the OSGi spec:

http://tinyurl.com/dnaed

"This method [BundleListener#start()] must complete and return to its
caller in a timely manner."

So you would have to launch your application on a separate thread and
#start should return asap. But beware you are skipping the conventional
way of starting Eclipse applications (which is managed by the
org.eclipse.core.runtime plug-in) so you might find some other issues
down the road.

Rafael

Sheng Fang wrote:
>
> First thank you very much for your patience.
>
>> I have a plugin with an application extension. The plugin contains
>> the class Foo which implements
>> org.eclipse.core.runtime.IPlatformRunnable. I consider this class as
>> the main entry point of an application.
>
> Either does the mine.
>
>> Then there are some other plugins with the main domain logic of my
>> program. The sum of all plugins is my RCP application.
>
>
>> I interpret your term RCP-APP as an application with only one plugin
>> which contains the application extension. So if the RCP-APP should be
>> started when this single plugin is started, I would try to call the
>> run method of the IPlatformRunnable implementation (class Foo in my
>> setup) within the start method of the BundleActivator of this single
>> plugin.
>
> No, my RCP-APP is the same as yours, it contente a own .jar, and some
> eclipse dependence plugins.
>
>> I hope this is understandable :)
>
> Totally understandable, thanx.
> I tried to do as you said, put the RUN method into Bundle.start() like
> this: ------- CODE -------
> public void start(BundleContext context) throws Exception {
> super.start(context);
> Application app = new Application();
> app.run(null);
> }
> ------- END -------
>
> This work only when I run the APP under Eclipse as an Eclipse
> Application, but it throws the follows exceptions when I start all the
> plugins manuelly with Exquinox(org.eclipse.osgi) console mode:
> ------------------------------------------------------------ --------
> Framework is launched.
>
> id State Bundle
> 0 ACTIVE system.bundle_3.2.0
> 3 ACTIVE org.eclipse.ui_3.2.0
> 5 ACTIVE org.eclipse.ui.workbench_3.2.0
> 6 ACTIVE org.eclipse.swt_3.1.0
> Fragments=7
> 7 RESOLVED org.eclipse.swt.win32.win32.x86_3.1.0
> Master=6
> 9 ACTIVE org.eclipse.jface_3.2.0
> 10 ACTIVE org.eclipse.core.runtime_3.1.0
> 11 ACTIVE org.eclipse.core.commands_3.2.0
> 12 ACTIVE org.eclipse.help_3.1.0
> 13 ACTIVE org.eclipse.core.expressions_3.1.0
> 14 RESOLVED com.tgestiona.test.rcpplugin_1.0.0
>
> osgi> start 14
> org.osgi.framework.BundleException: The activator
> com.tgestiona.test.rcpplugin.A
> ctivator for bundle com.tgestiona.test.rcpplugin is invalid
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleAct
> ivator(AbstractBundle.java:147)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(Bund
> leContextImpl.java:965)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
> eHost.java:313)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
> tBundle.java:262)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._st
> art(FrameworkCommandProvider.java:232)
> 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.osgi.framework.internal.core.FrameworkCommandInt erpreter.
> execute(FrameworkCommandInterpreter.java:145)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(F
> rameworkConsole.java:293)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(Fra
> meworkConsole.java:278)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(Framewo
> rkConsole.java:213)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.IllegalStateException: The state indicates the
> bundle is re
> solved
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getR esolution
> FailureMessage(AbstractBundle.java:1348)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
> eHost.java:288)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
> tBundle.java:262)
> at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(Ec
> lipseClassLoader.java:116)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(
> BundleLoader.java:337)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
> eLoader.java:389)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
> eLoader.java:350)
> at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass
> (AbstractClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(Bundl
> eLoader.java:275)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleH
> ost.java:227)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleAct
> ivator(AbstractBundle.java:133)
> ... 13 more
> Nested Exception:
> java.lang.IllegalStateException: The state indicates the bundle is resolved
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getR esolution
> FailureMessage(AbstractBundle.java:1348)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
> eHost.java:288)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
> tBundle.java:262)
> at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(Ec
> lipseClassLoader.java:116)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(
> BundleLoader.java:337)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
> eLoader.java:389)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
> eLoader.java:350)
> at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass
> (AbstractClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(Bundl
> eLoader.java:275)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleH
> ost.java:227)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleAct
> ivator(AbstractBundle.java:133)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(Bund
> leContextImpl.java:965)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
> eHost.java:313)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
> tBundle.java:262)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._st
> art(FrameworkCommandProvider.java:232)
> 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.osgi.framework.internal.core.FrameworkCommandInt erpreter.
> execute(FrameworkCommandInterpreter.java:145)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(F
> rameworkConsole.java:293)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(Fra
> meworkConsole.java:278)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(Framewo
> rkConsole.java:213)
> at java.lang.Thread.run(Unknown Source)
> Nested Exception:
> java.lang.IllegalStateException: The state indicates the bundle is resolved
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getR esolution
> FailureMessage(AbstractBundle.java:1348)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
> eHost.java:288)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
> tBundle.java:262)
> at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(Ec
> lipseClassLoader.java:116)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(
> BundleLoader.java:337)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
> eLoader.java:389)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(Bundl
> eLoader.java:350)
> at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass
> (AbstractClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(Bundl
> eLoader.java:275)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleH
> ost.java:227)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleAct
> ivator(AbstractBundle.java:133)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(Bund
> leContextImpl.java:965)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(Bundl
> eHost.java:313)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstrac
> tBundle.java:262)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._st
> art(FrameworkCommandProvider.java:232)
> 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.osgi.framework.internal.core.FrameworkCommandInt erpreter.
> execute(FrameworkCommandInterpreter.java:145)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(F
> rameworkConsole.java:293)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(Fra
> meworkConsole.java:278)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(Framewo
> rkConsole.java:213)
> at java.lang.Thread.run(Unknown Source)
>
> osgi>
> ------------------------------------------------------------ ---------
>
> My mind is overflowed at this moment, thanx for any suggestion.
>
> Sheng
>
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52875 is a reply to message #52822] Fri, 11 November 2005 09:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

Thanx very much for your explication, it's fairly helpful. So you mean
there's no esay way to launch a RCP as I was trying?
--
In fact, I was tried to launch my RCP-APP from another Java App by normal
calls in java code, no EclipseStater, no WebStart, because these can
create a new VM and it would be quite critical in system consuming.
--
Dou you know where I could found any related information?
--
Thanx again.
--
Sheng
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52902 is a reply to message #52875] Fri, 11 November 2005 12:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves.inf.no.spam.ufsc.br

I did not say it would not work, just that this scenario was not tested,
so it may not work.

You can call org.eclipse.core.runtime.adaptor.EclipseStarter (or
org.eclipse.core.launcher.Main, available in the startup.jar, which
might be easier) as a regular Java method call. No VM will ever be
created by these. Unless if by "EclipseStarter" you actually meant the
Eclipse native launcher, which is a platofrm native program that in fact
does create a new VM.

If all you want to do is to start Eclipse in the same VM as an already
running Java app, that is doable (with some restrictions though). You
will find posts here, on the platform and on the rcp newsgroups where
people are trying to do that.

Rafael

Sheng Fang wrote:
>
> Thanx very much for your explication, it's fairly helpful. So you mean
> there's no esay way to launch a RCP as I was trying?
> --
> In fact, I was tried to launch my RCP-APP from another Java App by
> normal calls in java code, no EclipseStater, no WebStart, because these
> can create a new VM and it would be quite critical in system consuming. --
> Dou you know where I could found any related information? --
> Thanx again. --
> Sheng
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52929 is a reply to message #52902] Mon, 14 November 2005 08:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

> You can call org.eclipse.core.runtime.adaptor.EclipseStarter (or
> org.eclipse.core.launcher.Main, available in the startup.jar, which
> might be easier) as a regular Java method call. No VM will ever be
> created by these. Unless if by "EclipseStarter" you actually meant the
> Eclipse native launcher, which is a platofrm native program that in fact
> does create a new VM.
-
- I've tried to launch with
org.eclipse.core.runtime.adaptor.EclipseStarter and
org.eclipse.core.launcher.Main, but there were many exceptions. Now I
think it would be that I haven't configured all the arguments for there,
I'll try it again, Thanx-
-
> If all you want to do is to start Eclipse in the same VM as an already
> running Java app, that is doable (with some restrictions though). You
> will find posts here, on the platform and on the rcp newsgroups where
> people are trying to do that.
-
- This is just the thing which I want, I'll look for them, but better if
you can give me some URLs which you know.
-

Thanx very much.
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52949 is a reply to message #52902] Mon, 14 November 2005 11:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

By the
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52974 is a reply to message #52902] Mon, 14 November 2005 11:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

Rafael,

By the way, do you know where to get docs about which arguments should be
needed if I use [org.eclipse.core.runtime.adaptor.EclipseStarter] or
[org.eclipse.core.launcher.Main]?

Thanx very much
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52999 is a reply to message #52974] Tue, 15 November 2005 01:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves.inf.no.spam.ufsc.br

The command line arguments for Main are basically the same as the ones
for Eclipse:

http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/misc/runtime-options.html

But you should not have to pass any argument if you don't want to. It
should work the same. The only restriction is if you are running on
Linux/GTK, where you are forced to pass "-ws gtk".

Note though that (at least for now) you cannot start Eclipse from an
application that already installed a URL handler factory. Eclipse needs
to be able to install its own.

Rafael

Sheng Fang wrote:
> Rafael,
> By the way, do you know where to get docs about which arguments should
> be needed if I use [org.eclipse.core.runtime.adaptor.EclipseStarter] or
> [org.eclipse.core.launcher.Main]?
> Thanx very much
>
>
>
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #53025 is a reply to message #52999] Tue, 15 November 2005 09:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

> The command line arguments for Main are basically the same as the ones
> for Eclipse:

>
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/misc/runtime-options.html

> But you should not have to pass any argument if you don't want to. It
> should work the same. The only restriction is if you are running on
> Linux/GTK, where you are forced to pass "-ws gtk".

Thanx Rafeal, I remember I tried once to launch the RCP-APP in this
manner, but it doesn't found the main application plugin to start, if we
don't give it any arguments, how does the Main know which .jar contains
the main app? -

Sheng
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #53047 is a reply to message #52999] Tue, 15 November 2005 09:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

> Thanx Rafeal, I remember I tried once to launch the RCP-APP in this manner,
> but it doesn't found the main application plugin to start, if we don't give
> it any arguments, how does the Main know which .jar contains the main app?

I wanted to say "it didn't find the main application plugin to start",
forgive me for my poor English.
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #53071 is a reply to message #52999] Tue, 15 November 2005 10:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

Thnank you Rafael,

I have tried with success, the only necesary argument is the path of
startup.jar, and then the Eclipse Launcher will find all others, and it is
necesario export the RCP-APP as a product first.

But another problem still last, it still create a VM using calls to the
Main(Class) of startup.jar.

Sheng
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #53096 is a reply to message #53071] Tue, 15 November 2005 12:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves.inf.no.spam.ufsc.br

Calling Main will *not* create a new VM. But if you are using
Runtime.exec(), then *you* are creating a new process. Don't do that. If
startup.jar is part of your classpath, just call:

Main.main(new String[0]);

Or pass in any arguments you want. If it is not, you will have to create
a URLClassLoader pointing to startup.jar's path and use it to load and
run Main.main() (using reflection).

HTH,

Rafael

Sheng Fang wrote:
> Thnank you Rafael,
> I have tried with success, the only necesary argument is the path of
> startup.jar, and then the Eclipse Launcher will find all others, and it
> is necesario export the RCP-APP as a product first.
> But another problem still last, it still create a VM using calls to the
> Main(Class) of startup.jar.
> Sheng
>
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #53121 is a reply to message #53096] Tue, 15 November 2005 13:21 Go to previous messageGo to next message
Ricky is currently offline RickyFriend
Messages: 204
Registered: July 2009
Senior Member
> Main.main(new String[0]);

The JavaDoc of main(...) says that a parameter is needed.

* Runs the platform with the given arguments. The arguments must identify
* an application to run (e.g., <code>-application
com.example.application</code>).

Also using Main.run(...) is a better idea in this situation as
Main.main(...) calles System.exit(...). This would terminate everthing.

Besides this I really hope this is working.

Ricky
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #53147 is a reply to message #53121] Tue, 15 November 2005 13:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves.inf.no.spam.ufsc.br

I take your point about new Main().run(args) being the right way of
doing it. Thanks for pointing that out. But you don't have to pass in
any arguments. If the javadoc for Main.main() says that, it is a doc
bug. The -application parameter is only necessary if the product install
has no default product/application configured, or if you want to run a
different application.

Rafael

Ricky wrote:
>> Main.main(new String[0]);
>
>
> The JavaDoc of main(...) says that a parameter is needed.
>
> * Runs the platform with the given arguments. The arguments must identify
> * an application to run (e.g., <code>-application
> com.example.application</code>).
>
> Also using Main.run(...) is a better idea in this situation as
> Main.main(...) calles System.exit(...). This would terminate everthing.
>
> Besides this I really hope this is working.
>
> Ricky
Re: launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #53496 is a reply to message #53096] Fri, 18 November 2005 09:57 Go to previous message
Eclipse UserFriend
Originally posted by: sheng.clanfang.com

> Calling Main will *not* create a new VM. But if you are using
> Runtime.exec(), then *you* are creating a new process. Don't do that. If
> startup.jar is part of your classpath, just call:

Yes, you're right, it doesn't create a new VM, I made a mistake when I
counted the number of VM, and the code is like this:

<CODE>
String argsRcp[] = {"-install", RCP_INSTALL_LOC, "-noexit"};
Main.main(argsRcp);
</CODE>

Even it's not necasary to use Main.run(args[]), we can pass the "-noexit"
as argument to Main.main(), then the System.exit() will be not done, there
will be initialization problems if using the run(args[]) method which is
not static.

Thanx for all your helps.
Previous Topic:Server-side incubator
Next Topic:How does the extension registry handle multiple versions of the same plugin?
Goto Forum:
  


Current Time: Sat Apr 27 04:57:56 GMT 2024

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

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

Back to the top