添加新的 AUTH XOAUTH2 命令后尝试编译项目时出现以下错误。
byte[] response = String.format("user=%s\1auth=Bearer %s\1\1", msg.getFrom(),
token).getBytes();
response = BASE64EncoderStream.encode(response);
transport.issueCommand("AUTH XOAUTH2 " + new String(response), 235);
issueCommand(java.lang.String,int) has private access in com.sun.mail.smtp.SMTPTransport
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
<compilerarg value="-Xlint:unchecked"/>
,但仍然无法解决。所以我又加了一个 <compilerarg value="-Xlint:deprecation"/>
.但仍然说有错误。<javac source="1.6" target="1.6" srcdir="${src}" destdir="${build}" deprecation="no" debug="yes" listfiles="no">
最佳答案
javap com.sun.mail.smtp.SMTPTransport
报告 public synchronized void issueCommand(java.lang.String, int) throws javax.mail.MessagingException;对于 JavaMail 1.4.4。 com.sun.mail.smtp.SMTPTransport
出于某种原因上课。关于java - issueCommand(java.lang.String,int) 在 com.sun.mail.smtp.SMTPTransport 编译错误中具有私有(private)访问权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14679566/
相关文章:
compiler-errors - 收到此错误LNK2019,不知道为什么
python - AttributeError : 'int' object has no attr
c++ - Qt : Error while compiling Qt 5.0.1 on Windo
ruby-on-rails - Rails ActionView::Template::Error:
apache - htaccess 将所有页面重定向到单个页面
c++ - 使用G++的模板的编译错误,使用llvm编译正常