NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

How to set the NetBeans boot class path to include mail.jar?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
jnadelman



Joined: 20 Sep 2010
Posts: 3

PostPosted: Mon Sep 20, 2010 2:24 pm    Post subject: How to set the NetBeans boot class path to include mail.jar? Reply with quote

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

PostPosted: Wed Sep 22, 2010 11:52 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo