Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » starting 2nd RCP from first
starting 2nd RCP from first [message #435421] Wed, 17 August 2005 19:31 Go to next message
EJ Blom is currently offline EJ BlomFriend
Messages: 24
Registered: July 2009
Junior Member
We developed 2 RCP applications which were exported as products.
Using the first RCP, we modify the startup ini file from the second RCP.
If we manually start the 2nd RCP, the changes in the ini file will then take
effect.
However, we would like to invoke this 2nd RCP from our first RCP.
Normally one would do this with:
Re: starting 2nd RCP from first [message #435422 is a reply to message #435421] Wed, 17 August 2005 19:35 Go to previous messageGo to next message
EJ Blom is currently offline EJ BlomFriend
Messages: 24
Registered: July 2009
Junior Member
sorry, my MS mail client decided to post this message before I was ready
typing.
Anyway, where was I, oh yeah, starting an external program in java.
one way of starting an external program:

new CmdExec("my2ndRCP.exe");

or

Process p = Runtime.getRuntime().exec("my2ndRCP.exe");
p.waitFor();

However, this is a bit nasty since we deploy our RCP for several platforms.
Is there a nice way of starting the 2nd RCP? We know the location of the 2nd
RCP
during runtime of the first RCP.

Regards

EJ
Re: starting 2nd RCP from first [message #435427 is a reply to message #435422] Thu, 18 August 2005 00:03 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 440
Registered: July 2009
Senior Member
If not having a splash screen is not a problem, and if the startup ini
file you are referring to is config.ini or <eclipse>.ini then you can
run java.exe -jar startup.jar
Otherwise you would have to know the platform you are running and do the
ugly if case :-)

PaScaL

Evert-Jan Blom wrote:
> sorry, my MS mail client decided to post this message before I was ready
> typing.
> Anyway, where was I, oh yeah, starting an external program in java.
> one way of starting an external program:
>
> new CmdExec("my2ndRCP.exe");
>
> or
>
> Process p = Runtime.getRuntime().exec("my2ndRCP.exe");
> p.waitFor();
>
> However, this is a bit nasty since we deploy our RCP for several platforms.
> Is there a nice way of starting the 2nd RCP? We know the location of the 2nd
> RCP
> during runtime of the first RCP.
>
> Regards
>
> EJ
>
>
Re: starting 2nd RCP from first [message #435430 is a reply to message #435427] Thu, 18 August 2005 07:55 Go to previous messageGo to next message
EJ Blom is currently offline EJ BlomFriend
Messages: 24
Registered: July 2009
Junior Member
"Pascal Rapicault" <pascal@ibm.canada> wrote in message
news:de0j8i$hq3$1@news.eclipse.org...
> If not having a splash screen is not a problem, and if the startup ini
> file you are referring to is config.ini or <eclipse>.ini then you can run
> java.exe -jar startup.jar
> Otherwise you would have to know the platform you are running and do the
> ugly if case :-)

You mean something like,

if(myApplicationStartupCommand.indexOf(".exe")>-1){

run MS command

}else{

the rest

}

Interesting, but hey, if it works, we don't care ;-), thanks, we will test
it

EJ
Re: starting 2nd RCP from first [message #435707 is a reply to message #435430] Mon, 22 August 2005 11:25 Go to previous message
EJ Blom is currently offline EJ BlomFriend
Messages: 24
Registered: July 2009
Junior Member
OK we've found it:

Program.launch(String fileName);

Class Program in which the launch method is static.
Api documentation of this class can be found here:

http://download.eclipse.org/eclipse/downloads/documentation/ 2.0/html/plugins/org.eclipse.platform.doc.isv/reference/api/ org/eclipse/swt/program/Program.html

Regards

EJ
Previous Topic:Any tips on using jUnit to test RCP application?
Next Topic:Modality of detached views
Goto Forum:
  


Current Time: Sun Dec 08 23:05:01 GMT 2024

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

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

Back to the top