• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Not finding Packages when compiling (javamail)

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm trying to compile my class extending james's mailet GenericMailet. I think that my environment variables are not correct or something, because I am getting

TestThis.java:9: cannot find symbol
symbol : class Mail
location: package org.apache.mailet
import org.apache.mailet.Mail;

Continously. Below I have my environment variable. I thought that I have everything I need for JAMES's packages to be found in their jar's. I did read the faq on environment variables, so I feel I have the right environment variables set.

Please help,
Thankyou



.;C:\PROGRA~1\Java\jdk1.6.0\lib;C:\PROGRA~1\Java\javamail-1.4;C:\PROGRA~1\Java\javamail-1.4\lib;C:\PROGRA~1\Java\jaf-1.1;C:\MyJava\james-2.3.0\lib;C:\PROGRA~1\Java;;C:\PROGRA~1\Java\jre1.6.0\lib\ext\QTJava.zip;C:\MyJava\james-2.3.0\lib;C:\PROGRA~1\Java\SAR-INF\lib;C:\PROGRA~1\Java\jdk1.6.0\lib;C:\PROGRA~1\Java\javamail-1.4\mail.jar;C:\PROGRA~1\Java\javamail-1.4\lib\*.jar;C:\PROGRA~1\Java\jaf-1.1\activation.jar;C:\PROGRA~1\Java\jaf-1.1\*.jar;C:\MyJava\james-2.3.0\lib\*.jar;C:\PROGRA~1\Java\james- 2.3.0.jar;C:\PROGRA~1\Java\*.jar;C:\PROGRA~1\Java\jre1.6.0\lib\ext\QTJava.zip;C:\MyJava\james-2.3.0\lib\*.jar;C:\PROGRA~1\Java\SAR-INF\lib\mailet-2.3.jar;C:\PROGRA~1\Java\SAR-INF\lib\*.jar
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't use wildcards like "*.jar" in classpaths. Every jar file needs to be listed individually.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that you can't use "*" in the CLASSPATH; you have to explicitly name jars. This might be messing things up for you; try removing the wildcards.

Better yet, don't use CLASSPATH at all. Provide just the jars your program needs using the -cp or -classpath switches to the compiler and runtime. Too much work? Then use a script, or learn to use Ant.
 
Jimmy Die
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought the * was valid, thanks for that heads up.

I'll also take your suggestion about the -classpath switch, and I am looking at ant also.

Thanks so much,
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic