Hi,
I am currently experiencing problems with JavaMail under JRE 6.0. It is a little odd in that it works fine when run as standalone app, but when called through JNI it throws the following exception:
java.lang.ClassCastException: javax.mail.util.SharedByteArrayInputStream cannot be cast to javax.mail.Multipart
when executing the following line of code:
Multipart parts = (Multipart) mimeMessage.getContent();
I've checked the mailcap file contains the content-handler and that the mail.jar is on the classpath.
This same code works fine under versions 1.4.2 and 5.0 of the JRE.
Any help appreciated!
Regards,
Matt