【发布时间】:2016-02-01 22:35:07
【问题描述】:
我正在尝试在这里运行示例程序http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-java.html 这是命令输出...
$ java AmazonSESSample -cp "javamail-1.4.3/mail.jar"
java.lang.NoClassDefFoundError: javax/mail/Address
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
atsun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: javax.mail.Address
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
我尝试使用此搜索字符串在 Google 上寻找答案...
search string = java mail.jar "Error: A JNI error has occurred, please check your installation and try again"
我没有在搜索结果中看到任何有用的东西 :-(
有什么想法吗?
【问题讨论】: