launch my eclipse RCP-APP just using Equinox not the EclipseStater [message #52580] |
Mon, 07 November 2005 08:05  |
Eclipse User |
|
|
|
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 #52902 is a reply to message #52875] |
Fri, 11 November 2005 07:55   |
Eclipse User |
|
|
|
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 03:45   |
Eclipse User |
|
|
|
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 #53096 is a reply to message #53071] |
Tue, 15 November 2005 07:59   |
Eclipse User |
|
|
|
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 #53496 is a reply to message #53096] |
Fri, 18 November 2005 04:57  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.08743 seconds