When using getContent() I just get the data as InputStream although it should be a String. Seems the DataContentHandler could not be found.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Stefan_Keick
Posted On:   Tuesday, July 2, 2002 01:37 AM

Hi, I am using NetBeans IDE to write a simple mail client. When I start the client out of NetBeans IDE everything works fine. I can show the mails and their content. BUT when I start the JAR I've created I don't get the content anymore (with getContent()). The content is now only an InputStream. The Java Activation doc says : 'If no DataContentHandler can be found for the the type of this data, the DataHandler returns an InputStream for the data.' Seems that's my problem. How can I enable my JAR to find such a handler? I have added: acivation.jar -> com and javax mail   More>>

Hi,


I am using NetBeans IDE to write a simple mail client.
When I start the client out of NetBeans IDE everything works fine. I can show the mails and their content.



BUT when I start the JAR I've created I don't get the content anymore (with getContent()). The content is now only an InputStream.



The Java Activation doc says : 'If no DataContentHandler can be found for the the type of this data, the DataHandler returns an InputStream for the data.'



Seems that's my problem.




How can I enable my JAR to find such a handler?



I have added:
acivation.jar -> com and javax

mail.jar -> com and javax
to my jar.



Thanks in advance
Stefan    <<Less

Re: When using getContent() I just get the data as InputStream although it should be a String. Seems the DataContentHandler could not be found.

Posted By:   Gautam_Marwaha  
Posted On:   Tuesday, July 2, 2002 01:57 AM

Try running the app. by providing the classpath containing activation.jar and mail.jar instead of putting their classes in the application jar file

Check output from getContentType(). Are you setting a DataHandler using setDataHandler()?

About | Sitemap | Contact