mardi 24 février 2015

Java Find default desktop application for extension

I am looking for a way, using java to find the default application for opening a certain extension. For example, I have Gimp set to open all .jpg files. So when I evaluate xyz.jpg I want to be able to find Gimp. I DO NOT want to open the file with the application I just want to know what it is.


I tried sifting through the registry and Gimp was not the default it was windows photo viewer even though the desktop recognizes it as Gimp.


I also tried using assoc and ftype from the command line and it also returned windows photo viewer. I assume this is because it is just looking at the registry.


Note: I do not want to change the default application in the registry I just want to know how I can find what the desktop finds as the default application for a certain extension.


Matt


Aucun commentaire:

Enregistrer un commentaire