File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Extensions Mappings

 
Jean-Philippe Pellet
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 175
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic