In FullMailcapCommandMap.java, in the constructor you
add userdir\mailcap.txt file to the mailcaps and then
assign the file to 'sourceFile'. If the file already
doesn't exist, it throws an IOException and proceeds.
When a command is set as default, the command is added
only if sourceFile is not null. But it'll be null
because the assignment was never done.
To fix this, I just flipped the following two lines of
code in the FullMailcapCommandMap() constructor:
-----
addMailcapFile(System.getProperty("user.home") +
System.getProperty("file.separator")+"mailcap.txt");
sourceFile = new
File(System.getProperty("user.home")+System.getProperty("file.separator")+"mailcap.txt");
---------
Changed code:
------
sourceFile = new
File(System.getProperty("user.home")+System.getProperty("file.separator")+"mailcap.txt");
addMailcapFile(System.getProperty("user.home") +
System.getProperty("file.separator")+"mailcap.txt");
------
Thanks,
Gopi