Skip to main content


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 18:44 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 105
Registered: December 2010
Senior 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 20:41 Go to previous messageGo to next message
Libor Jelinek is currently offline Libor JelinekFriend
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 21:05 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 105
Registered: December 2010
Senior 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: Thu Apr 25 14:35:37 GMT 2024

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

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

Back to the top