- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经在 Windows(64 位)上安装了 java。我的问题是:如何在我的 PC 上安装 Javamail?我用这种方式创建类路径 %classpath%;c:\....
等。但仍然无法正常工作。我得到了错误
The import javax.mail cannot be resolved
最佳答案
要安装 Javamail,您应该查看 ReadMe .其中指出:
Note that the JavaMail API requires the JavaBeans(TM) Activation Framework package to be installed as well if you're using JDK 1.5 or earlier. Download the latest version of the JavaBeans Activation Framework from
http://www.oracle.com/technetwork/java/javase/index-jsp-136939.html
and install it in a suitable location.
和
Unzip the javamail1_4_5.zip archive. (You may have already done this.)
Set your CLASSPATH to include the "mail.jar" file obtained from the download, as well as the current directory.
Assuming you unzipped javamail1_4_5.zip in c:\download the following would work:
set CLASSPATH=%CLASSPATH%;c:\download\javamail-1.4.5\mail.jar;.
Also, if you're using JDK 1.5 or earlier, include the "activation.jar" file that you obtained from downloading the JavaBeans Activation Framework, in your CLASSPATH.
set CLASSPATH=%CLASSPATH%;c:\download\activation\activation.jar
Go to the demo directory
Compile any demo using your Java compiler. For example:
javac msgshow.java
Run the demo. The '-' option lists the required and optional command-line options to successfully run any demo. For example:
java msgshow -
lists the available options. And
java msgshow -T imap -H -U -P -f INBOX 5
uses the IMAP protocol to display message number 5 from your INBOX.
关于java - 如何在 windows-64bit "Home Premium"中设置 javamail 路径和类路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10161448/
我是一名优秀的程序员,十分优秀!