Name: krC82822 Date: 08/04/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
1) The problem
The constructor javax.activation.ActivationDataFlavor( String mimeType , String
humanPresentableName ) which is used internally by JavaMail does not work. To
demonstrate run the code below: This fails with all versions of JavaMail and
2) Source code
public class ActivationDataFlavorTest
public static void main( String args )
// Fatal line
ActivationDataFlavor adf =
new ActivationDataFlavor( "text/plain" , "Plain text" );
System.out.println( adf );
3) Error messaage:
Exception in thread "main" java.lang.IllegalAccessError: try to access field
java.awt.datatransfer.DataFlavor.class$java$io$InputStream from class
Disassembling javax.activation.ActivationDataFlavor shows that it it trying to
access a package-private variable in java.awt.datatransfer.DataFlavor:
static Class class$java$io$InputStream
This implies that the compiler used to compile JAF 1.0.1 had a serious flaw in
it. This bug was submitted before as Bug ID 4366379 but was closed erroneously,
however the reason given when closing it explains the problem -
JAF 1.0.1 must have been compiled with a JDK prior to 1.1.6 and has this
problem with inner classes mentioned.
I have tested recompiling my disassembled ActivationDataFlavor then adding it
to activation.jar using JDK 1.3 & 1.4 and it works perfectly. However, if I
understand the license correctly, I cannot then redistribute activation.jar
with my application as I have modified it.
Please recompile the JAF and rerelease it.
(Review ID: 129018)