-
Enhancement
-
Resolution: Fixed
-
P5
-
1.0.2
-
1.1beta
-
x86
-
windows_2000
Name: bs11 Date: 04/14/2003
FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
FULL OPERATING SYSTEM VERSION :
Windows NT 5.0
A DESCRIPTION OF THE PROBLEM :
The documentation for this class says:
# Note that mailcap entries that do not contain 'x-java' parameters
# and comply to RFC 1524 are simply ignored:
image/gif; /usr/dt/bin/sdtimage %s
And it is indeed what it does. Unfortunately, real world Java applications need the information that is
ignored w/o having to rewrite our own mailcap classes. The reason is that Java apps need to be able to
run other programs to display different file types. E.g., PDF files, etc. We can maintain our own
mailcap-like system, but the information is there already and already parsed by a Java class.
If we could get the mailcap info, we need to be able to do something like
CommandInfo.getCommandExecString(<text paramlist>) so we can launch the app.
EXPECTED VERSUS ACTUAL BEHAVIOR :
See description
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
MailcapCommandMap cmdMap = new MailcapCommandMap();
CommandInfo[] cmds = cmdMap.getAllCommands("text/plain");
System.out.println("numcmds: " + cmds.length);
for (int i = 0; i < cmds.length; i++) {
System.out.println(i + ") " + cmds[i].getCommandName() + " | " + cmds[i].getCommandClass());
}
You'll see that only x-java commands are listed.
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Write your own mailcap parser or call a native DLL or write your own mailcap clone.
(Review ID: 178735)
======================================================================