Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » launching external programs for specific files
launching external programs for specific files [message #812388] Sat, 03 March 2012 13:44 Go to next message
John Lussmyer is currently offline John Lussmyer
Messages: 96
Registered: December 2010
Member
Is there a standard way of launching the "default" program for a specific data file?
i.e. I have a PDF, and want a PDF Viewer to open, Image file would get an ImageView, etc..
My app often has files that need to be viewed in some other app - and I'd rather not require the user to have to configure each and every possible .ext->app mapping.
Re: launching external programs for specific files [message #812439 is a reply to message #812388] Sat, 03 March 2012 15:41 Go to previous messageGo to next message
Libor Jelinek is currently offline Libor Jelinek
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Not sure whether Eclipse provides this because it's achievable with pure Java as easy as
Desktop.open(new File("your.pdf"))


Checkout javadoc for java.awt.Desktop (JDK 1.6+).
Re: launching external programs for specific files [message #812450 is a reply to message #812439] Sat, 03 March 2012 16:05 Go to previous message
John Lussmyer is currently offline John Lussmyer
Messages: 96
Registered: December 2010
Member
Thanks! I haven't kept up on all the changes to java....
Previous Topic:no schema found for extension point
Next Topic:What is trim?
Goto Forum:
  


Current Time: Fri Aug 01 18:45:29 EDT 2014

Powered by FUDForum. Page generated in 0.01439 seconds