I have a javamail app that works fine in the Android/Eclipse environment, but throws the following in NetBeans (porting Android app to Desktop):
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed boundary="----=_Part_0_7749469.1284737984291"
I found a workaround here, but can't figure out how to apply it in NetBeans. I have already added mail.jar to my NetBeans compile time libraries but don't understand how to set the NetBeans boot class path to include mail.jar as suggested in the workaround. From http://www.opensubscriber.com/message/[email protected]/7570201.html
JAF uses the context class loader to load classes. If that fails, it uses the class loader that loaded the JAF classes.
When JAF is packaged with the application, the JAF classes are loaded by the same class loader as the other application classes, so even if the context class loader isn't set JAF can find the other application classes.
When JAF is part of the JDK, the JAF classes are loaded by the system class loader. Without the context class loader being set, JAF has no way to find the appropriate class loader to load application classes.
(Since JavaMail is packaged with the application, the JavaMail class are treated the same as application classes.)
A workaround is to set the boot class path to include mail.jar.
How do I set the NetBeans boot class path to include mail.jar?