wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes File Extensions Mappings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "File Extensions Mappings" Watch "File Extensions Mappings" New topic
Author

File Extensions Mappings

Jean-Philippe Pellet
Greenhorn

Joined: Sep 10, 2003
Posts: 2
Hi,
My application writes files with extension .xtp. How can I tell the OS (be it Windows, Mac OS X or another *nix) to use my compiled java application when I double-click on my .xtp file? Does my application have to be a jar archive? If possible I would like to do that in my code, but if it's not possible then how can I do it 'by hand'?
TIA,
JPP
VIJAY Yadlapati
Ranch Hand

Joined: Aug 04, 2003
Posts: 175
I am not familier with OS other than Windows. For Windows, you should use JNI to create a new Key under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts, and a node under it, with Value Name as Application, Value data as application - with which the file has to be opened.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Extensions Mappings
 
Similar Threads
unsynchronized file reading
Monitoring Folders
batch file run from Windows or Linux
default calling the java file in windows and linux
xsl and jsp