Rob Prime wrote:When you use JAR files and the -jar flag, the class path is ignored. Try putting the JavaMail JAR file in a folder relative to your JAR file, then adding it to the Class-Path directive in your MANIFEST.MF file.
Well, I'm using Netbeans, so I don't know of a way of modifying the manifest file. I've put the javamail JAR in both the compile and run-time libraries in Netbeans, but am still getting this error from the JAR that is generated from my project (the JAR in the dist path of my Netbeans project). Do I maybe need to look at building this without the use of Netbeans, so that I have more granularity of control? Surely Netbeans has the capabilities to do what I am wanting to do; maybe I'm just missing a step somewhere? Again, I can double-click the JAR file, and it runs, but when run via the task scheduler under those same account privileges, that's when I get the error.