I am using java1.6 without using any IDE.Now i want to use java Mail API for my purpose.So, i copied Mail.jar into d:\externaljar folder.
And also i have set the classpath as set classpath=%classpath%;d:\externaljar;
my jdk installation folder is : c:\programfiles\jdk1.6.
But i faced package javax.mail does not exist during compilation.
Please Guide me to get out of this issue?
The jar file itself must be in the classpath, and not just the directory containing it.
And the CLASSPATH environment variable is
CLASSPATH, notclasspath. My advice would be to never use it, though. Always use the-classpath(or-cp) option with javac or java to pass the classpath.