NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
jnadelman
Joined: 20 Sep 2010 Posts: 3
|
Posted: Mon Sep 20, 2010 2:24 pm Post subject: How to set the NetBeans boot class path to include mail.jar? |
|
|
I have a javamail app that works fine in the Android/Eclipse environment, but throws the following in NetBeans (I am porting an Android app to Desktop):
[quote]javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed boundary="----=_Part_0_7749469.1284737984291"[/quote]I found a workaround at http://www.opensubscriber.com/message/javamail-interest@java.sun.com/7570201.html, 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/javamail-interest@java.sun.com/7570201.html
[quote]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.[/quote]
How do I set the NetBeans boot class path to include mail.jar? |
|
| Back to top |
|
 |
jnadelman
Joined: 20 Sep 2010 Posts: 3
|
Posted: Wed Sep 22, 2010 11:52 am Post subject: |
|
|
| I got rid of the error by removing activation.jar from the project. According to oracle.com/technetwork/java/index-138643.html "Unless you're using Java SE 6, you will also need the JavaBeans Activation Framework (JAF) extension that provides the javax.activation package. We suggest you use version 1.1.1 of JAF, the latest release. JAF is included with Java SE 6." |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|