LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-21-2005, 10:39 AM   #1
german
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian etch, Gentoo
Posts: 312

Rep: Reputation: 30
using default applications from java?


In most operating systems, there's a "default application" for a certain type of file, IE I double click an MP3 and winamp or xmms starts. Is there any way to invoke this behaviour from java (I'd imagine I'd need a third party library), so I can essentially simulate the double click action in code? Actually a better example might be opening a certain MIME type in a web browser and clicking "Open" instead of "Save".

Thanks much

B.
 
Old 06-21-2005, 06:04 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,505

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
In most operating systems, there's a "default application" for a certain type of file
Not really, this mapping from file types to application is usually either application or graphic environment dependant. Only windows is an exception to that.

Java is not a graphic environment (like Gnome, KDE and the likes are), so hasn't this feature built-in.
However Java can integrate deeply into some of the graphic environments it can run in with JDIC (https://jdic.dev.java.net/), which is really what you are looking for I guess.
In particular, have a look at the classes org.jdesktop.jdic.desktop.Desktop and org.jdesktop.jdic.filetypes.Association.

Last edited by jlliagre; 06-21-2005 at 06:05 PM.
 
Old 06-21-2005, 11:26 PM   #3
german
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian etch, Gentoo
Posts: 312

Original Poster
Rep: Reputation: 30
thanks... that is exactly what I'm looking for...

and you're right, my phrasing was incorrect there... most Desktop Environments support default applications.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XFCE: set default applications to extensions senorsnor Linux - Software 4 08-24-2011 07:03 PM
evolution and default applications for attached files srsw10 Linux - Software 0 01-11-2005 08:34 AM
java applications repository dukeinlondon Linux - Software 3 12-25-2004 11:14 AM
Multiple desktops and default applications Andramalech Linux - Newbie 8 12-07-2004 11:03 AM
Java-related applications.. Cliekid Yoper 2 12-02-2004 08:29 AM


All times are GMT -5. The time now is 09:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration