开发者

JavaMail and the Blackberry JRE

开发者 https://www.devze.com 2023-03-06 06:11 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号