【发布时间】:2011-05-15 17:44:11
【问题描述】:
我正在尝试在我的黑莓应用程序上使用 JavaMail jar,以便访问我的 GMail 电子邮件。我通常使用这种功能:
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);
但是,eclipse 抱怨 Properties 对象,因为我没有使用标准 JRE,而是使用黑莓 JRE。
无论如何,就Properties 而言,我可以通过对我的功能进行最小的更改来解决这个问题?
另外,我在使用System时遇到问题:
getProperties() 方法是 系统类型未定义。
这甚至可能起作用吗?!
谢谢大家
【问题讨论】:
标签: blackberry java-me gmail jakarta-mail