• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

mail.jar..

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic