JavaMail库上的限制错误 [英] Restriction error on JavaMail library
问题描述
当尝试使用javamail库中的 Session
类时,出现错误:
When trying to use the Session
class from the javamail library I get an error:
描述资源路径位置类型
访问限制:由于必需的库C:\Program Files\Java\jre7\lib\ext\mail.jar的限制,无法访问会话类型。 Mailer.java / MailerApp / src第21行Java问题
我的图书馆位置不对吗?我的文件夹位于 jdf1.7.0_01 / jre / lib / ext
目录中。
Don't I have the library in the right place? I have the folder in the jdf1.7.0_01/jre/lib/ext
directory.
推荐答案
您无需将库放在 jre / lib / ext
中,只需按常规方式将其添加到应用程序的类路径中即可(不能说出您使用的是哪种IDE或构建系统,所以我不能帮您解决通常的方式。
You shouldn't need to put the library in jre/lib/ext
, just add it to your application's classpath in the normal way (you don't say what IDE or build system you're using so I can't help with what "the normal way" would be).
这篇关于JavaMail库上的限制错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!