Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Problem with org.eclipse.swt.program.Program
Problem with org.eclipse.swt.program.Program [message #446171] Thu, 18 November 2004 22:13 Go to next message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
Hi,

I would like to check if a program for PDF files (e.g. Adobe Reader) is
installed, before I call Program.launch().

I check this using the following code:
if (Program.findProgram("pdf") == null) {
// Show error message
} else {
Program.launch("some.pdf");
}

However, there are cases where Program.findProgram() returns null, even
though Adobe Acrobat is installed and works.

However, if I remove the check and just call Program.launch() then a
user that has no program to open PDF Files won't get an error message.

On Windows XP there don't seem to be any problems and WinXP would even
tell you that you should get Adobe Acrobat to open PDF files if you
don't have a program installed. However, for Windows 2000 and other
"older" versions of Windows I don't seem to see a solution.

I'm using the SWT libs as of Eclipse 3.0.1 (3063).

Any help or hint on this is highly appreciated.

Christian

P.S.: A Display exists. The GUI is running perfectly fine.
Re: Problem with org.eclipse.swt.program.Program [message #446172 is a reply to message #446171] Thu, 18 November 2004 22:17 Go to previous message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
> I check this using the following code:
> if (Program.findProgram("pdf") == null) {
> // Show error message
> } else {
> Program.launch("some.pdf");
> }
>
> However, there are cases where Program.findProgram() returns null, even
> though Adobe Acrobat is installed and works.

Well, might be the same problem as mentioned in bug 71228:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=71228

However, last comment dates back to the begin of August (almost 4
month). Any progress?
Previous Topic:text of a Text widget not redraw when resize
Next Topic:KeyListener and SWT Browser
Goto Forum:
  


Current Time: Sat Oct 24 21:32:56 GMT 2020

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

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

Back to the top