Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Email through "Program.launch"(How to open the mail editor through "Program.launch" ?)
Email through "Program.launch" [message #496057] Sat, 07 November 2009 17:32 Go to next message
Xavier Loiseau is currently offline Xavier LoiseauFriend
Messages: 7
Registered: July 2009
Junior Member
Hi,

In an RCP application, I try to programmatically open
the default external email editor through the following Java line:

boolean result = Program.launch("mailto:name@domain.com");

Unexpectedly, nothing happens and the result is false !

Here is a description of my platform:
- JRE: 1.5.020
- OS: Mac OS X 10.5.8 PowerPC
- RCP: Galileo

Notice that the following command is successful in a terminal:
open mailto:name@domain.com

Has anybody already noticed this issue ?

Does anybody know how to solve this issue ?

I am looking for a solution portable on different OS.

Thank you very much for your help.

Xav
Re: Email through "Program.launch" [message #496138 is a reply to message #496057] Mon, 09 November 2009 01:18 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi Xav,

If the input on the command line is "open mailto:mailto:name@domain.com"
shouldn't that be the same in the ProgramLaunch argument?

Best regards,

Wim


> Hi,
>
> In an RCP application, I try to programmatically open
> the default external email editor through the following Java line:
>
> boolean result = Program.launch("mailto:mailto:name@domain.com");
>
> Unexpectedly, nothing happens and the result is false !
>
> Here is a description of my platform:
> - JRE: 1.5.020
> - OS: Mac OS X 10.5.8 PowerPC
> - RCP: Galileo
>
> Notice that the following command is successful in a terminal:
> open mailto:mailto:name@domain.com
>
> Has anybody already noticed this issue ?
>
> Does anybody know how to solve this issue ?
>
> I am looking for a solution portable on different OS.
>
> Thank you very much for your help.
>
> Xav
Re: Email through "Program.launch" [message #496241 is a reply to message #496138] Mon, 09 November 2009 13:05 Go to previous messageGo to next message
Xavier Loiseau is currently offline Xavier LoiseauFriend
Messages: 7
Registered: July 2009
Junior Member
Hi Wim,

Thank you for your answer !

I also tried the following Java line:
boolean result = Program.launch("open mailto:name@domain.com");

But it does not work either !

Does anybody have any other idea ?

Thank you very much for your help.

Xav
Re: Email through "Program.launch" [message #496243 is a reply to message #496241] Mon, 09 November 2009 13:07 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Why not use JDK-ProcessBuilder?

Tom

xloiseau schrieb:
> Hi Wim,
>
> Thank you for your answer !
>
> I also tried the following Java line:
> boolean result = Program.launch("open mailto:mailto:name@domain.com");
>
> But it does not work either !
> Does anybody have any other idea ?
>
> Thank you very much for your help.
>
> Xav
>
Re: Email through "Program.launch" [message #496249 is a reply to message #496243] Mon, 09 November 2009 13:34 Go to previous messageGo to next message
Xavier Loiseau is currently offline Xavier LoiseauFriend
Messages: 7
Registered: July 2009
Junior Member
Hi Tom,

Thank you for your answer !

I do not want to provide an explicit system command
since I would rather have a platform-independent solution.

In other words, I only want to provide a "mailto" URI and
automatically have the default email editor launched.

Any other idea ?

Xav
Re: Email through "Program.launch" [message #496255 is a reply to message #496249] Mon, 09 November 2009 14:08 Go to previous messageGo to next message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 129
Registered: July 2009
Senior Member
Did you try use:


Desktop.getDesktop().mail(mailtoURI);



Greetz
Thomas
Re: Email through "Program.launch" [message #496298 is a reply to message #496255] Mon, 09 November 2009 16:00 Go to previous message
Xavier Loiseau is currently offline Xavier LoiseauFriend
Messages: 7
Registered: July 2009
Junior Member
Hi Thomas,

Thank you for your solution, it works !

I had to move my RCP application to a Mac OS X Intel since:
- The "Desktop" class is available since JRE 1.6 and
- There is not any JRE 1.6 available for the Mac OS X PowerPC.

But this move is acceptable in my context.

Thank you very much for your help !

Xav
Previous Topic:work with read only data location
Next Topic:Search menu trouble
Goto Forum:
  


Current Time: Thu Apr 25 12:59:44 GMT 2024

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

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

Back to the top