Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » findProgram
findProgram [message #457439] Fri, 24 June 2005 20:52 Go to next message
Geoffrey Ritchey is currently offline Geoffrey RitcheyFriend
Messages: 42
Registered: July 2009
Member
When I try Program.findProgram("pdf") I get a null returned. However if I
iteratate through the extensions I see pdf. If I iterate throw the
programs I see "{Adobe Acrobat 7.0 Document}". This use to work but I
guess the latest Adobe installed itself. Why wouldn't it work now?



String[] ext = Program.getExtensions();
for (int i = 0; i < ext.length; i++) {
BrowseXML.errout("extension[" + i + "]=" + ext[i]);

}
Program prog = Program.findProgram("PDF");
if (prog == null) {
Program[] p = Program.getPrograms();
for (int i = 0; i < p.length; i++)
BrowseXML.errout("program[" + i + "] = " + p[i]);

throw new SAXException("Could not find program to handle pdf.");
}
Re: findProgram [message #457836 is a reply to message #457439] Tue, 05 July 2005 19:13 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Program.findProgram("pdf") works for me.

"Geoff Ritchey" <geoffritchey@hotmail.com> wrote in message
news:5a88a2a8b094ad0decb757d3a0641789$1@www.eclipse.org...
>
> When I try Program.findProgram("pdf") I get a null returned. However if I
> iteratate through the extensions I see pdf. If I iterate throw the
> programs I see "{Adobe Acrobat 7.0 Document}". This use to work but I
> guess the latest Adobe installed itself. Why wouldn't it work now?
>
>
>
> String[] ext = Program.getExtensions();
> for (int i = 0; i < ext.length; i++) {
> BrowseXML.errout("extension[" + i + "]=" + ext[i]);
>
> }
> Program prog = Program.findProgram("PDF");
> if (prog == null) {
> Program[] p = Program.getPrograms();
> for (int i = 0; i < p.length; i++)
> BrowseXML.errout("program[" + i + "] = " + p[i]);
>
> throw new SAXException("Could not find program to handle pdf.");
> }
>
Previous Topic:Why can't I package jar plugins in a product?
Next Topic:No Cut/Copy/Paste actions in swt.custom.StyledText
Goto Forum:
  


Current Time: Fri Apr 26 03:16:12 GMT 2024

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

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

Back to the top