if an application changed my preferences.
You can call a specific application with Runtime.exec():
<http://www.javacoffeebreak.com/faq/faq0030.html>
if the user doesn't want to change the application that opens a file,
so much the better for him ; he has nothing to do !
but if he wants to change this application, java doesn't take into
account
the change made at the OS level unless this change has to be done at a
deeper level
such as the registry which would bother him a lot
AFAIK Java asks the OS to open the file, it is the OS that decides which
app is used, not Java.
I tried this program
------------------------------8<----------------------------
import java.io.File;
import java.io.IOException;
public class DesktopOpen {
public static void main(String[] args) {
File f = new File("C:/Temp/test.gif");
try {
java.awt.Desktop.getDesktop().open(f);
} catch (IOException e) {
e.printStackTrace();
}
}}
------------------------------8<----------------------------
It opened the test.gif with IE as expected.
In Windows Explorer I right clicked C:\Temp\test.gif and changed the
"Opens With" program from IE to IrfanView.
I re-ran my Java App, the image now opened in IrfanView as expected.
The Java app is consistent with what I get by double clicking the file
in Windows Explorer.
Post a small compilable example that displays the problem. Seehttp://sscc=
Actually my problem has been solved by re-starting Windows...