IntelliJ Java IDE
The moose likes Linux / UNIX and the fly likes setting file association Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "setting file association" Watch "setting file association" New topic
Author

setting file association

sonny kher
Ranch Hand

Joined: Nov 06, 2001
Posts: 83
How do I set up file associations in unix/linux so that a certain extension is always handled by a particular applicaiton. What I am referring to are streaming audio files on my box that netscape always prompts me to store even though I have media players that can handle such content.


_ __________________ _ <br />RHCE<br />SCJP<br />??:-(
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7231

The Unices don't use file name extensions to recognize type; they use a "magic number" stored in the first two bytes of the file itself. In Solaris, the file /etc/magic documents the known types.
Browsers are different. They recognize associations between MIME types and file extensions. Also, all the major browsers let you bind an application to a file type you are trying to load. In Netscape you can find this under Edit | Preferences... | Navigator | Applications. YMMV in your browser of choice.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
 
IntelliJ Java IDE
 
subject: setting file association
 
Threads others viewed
org.hibernate.MappingException: Unknown entity
Convert BufferedImage into File object
File Creation Date using JNI
registration form code
file download !
IntelliJ Java IDE