JavaMail and the Blackberry JRE
I am trying to make use of the JavaMail jar 开发者_StackOverflow中文版on my blackberry app so I can access my GMail emails. I usually make use of this sort of function:
Properties props = System.getProperties();
props.setProperty("mail.store.protocol", "imaps");
String html_email = "";
try {
Session session = Session.getDefaultInstance(props, null);
Store store = session.getStore("imaps");
store.connect("imap.gmail.com", email, password);
However, eclipse is complaining about the Properties
object as I am not making use of the standard JRE but rather the blackberry JRE.
Is there anyway, I can work around this with minimal changes to my function as far as the Properties
is concerned?
In addition, I am having trouble with the use of System
:
The method getProperties() is undefined for the type System.
Is this even likely to work?!
Thanks all
Hmm, looks like JavaMail is not built for use on JavaME.
精彩评论