• Post Reply Bookmark Topic Watch Topic
  • New Topic

mail.jar..  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to execute java files in windows command prompt.

Compilation fails because its not able to find mail.jar.
While executing the java files using eclipse mail.jar is automattically getting reffered from jboss lib folder.

Tried setting mail.jar in the classpath
and also tried including the mail.jar in jre lib folder. But still getting the same compilation error for the mail class.

Please share your suggestions.

Thanks,
Aruna.J
 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What commands exactly are you typing in to compile and run your program, and what error message exactly are you getting (please TellTheDetails)?
 
Aruna Jayabalu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below are the commands that I give in windows prompt

D:
cd proj\src\com\cts
set path=%path%;D:\jdk1.5.0_07\bin;
set classpath=%classpath;D:\proj\lib\*.jar

javac sendEmail.java

The compilation fails for sendEmail.java

sample error:
SendEmail.java:7: package javax.mail.internet does not exist
import javax.mail.internet.*;

Its not refferring mail.jar which is inside my proj lib folder.


 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aruna Jayabalu wrote:set classpath=%classpath;D:\proj\lib\*.jar

You are using Java 5.

Java 5 does not support wildcards such as *.jar while setting the classpath. You need to include all necessary JAR files with their full names in the classpath, instead of using *.jar.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!