> I am getting an error when I try to set my classpath to utilize the
> javamail components. I am using
[quoted text clipped - 14 lines]
>
> Thank you!
You need to put this in quotes, in order to escape the ;.
Try export CLASSPATH="/jaf-1.0.2/activation.jar;/javamail-1.3.1/mail.jar"
instead.

Signature
Kind regards,
Christophe Vanfleteren
PullnOutHair - 18 Apr 2004 02:00 GMT
> You need to put this in quotes, in order to escape the ;.
>
> Try export CLASSPATH="/jaf-1.0.2/activation.jar;/javamail-1.3.1/mail.jar"
> instead.
So that fixes the errors on my setting of the classpath, but now I get
an error that the javax.mail libraries don't exist directly after I
have added them to the classpath without any errors. I have
uninstalled all versions of java and reinstalled just the newest J2EE
1.4 download bundle. Everything works correctly on Windows, but not
in Linux. I have set all the path variable to point to the new java
install but no matter what I try I get an error.
Christophe Vanfleteren - 18 Apr 2004 08:32 GMT
>> You need to put this in quotes, in order to escape the ;.
>>
[quoted text clipped - 8 lines]
> in Linux. I have set all the path variable to point to the new java
> install but no matter what I try I get an error.
You'll need to give more info.
How are you trying to run this program? Are you sure your classpath is
correct? Type echo $CLASSPATH in the shell and look at it carefully.
What is the exact error?

Signature
Kind regards,
Christophe Vanfleteren
PullnOutHair - 19 Apr 2004 15:26 GMT
> >> You need to put this in quotes, in order to escape the ;.
> >>
[quoted text clipped - 15 lines]
>
> What is the exact error?
When I echo the classpath every jar file I included is there. It also
points to the directory in which my code is.
echo $CLASSPATH
.;./mail.jar;./activation.jar;./j2ee.jar
The error is
package javax.mail does not exist
import javax.mail;
package javax.mail.internet does not exist
import javax.mail.internet;
I have the exact same thing set up and working in windows but for some
reason I am missing something in linux.
Roedy Green - 22 Apr 2004 05:54 GMT
>.;./mail.jar;./activation.jar;./j2ee.jar
just put those jars in the ext directory. See
http://mindprod.com/jgloss/classpath.html
putting them on the classpath is much harder.
If you must, use an absolute pathname.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
PullnOutHair - 19 Apr 2004 15:41 GMT
So it is always something really easy......
http://oldlook.experts-exchange.com:8080/Programming/Programming_Languages/Java/
Q_20807032.html
This is where I found a quick and easy solution that removed any
classpath problems.
Thanks for all your help and ideas
Steve W. Jackson - 19 Apr 2004 19:20 GMT
>:PullnOutHair wrote:
>:
[quoted text clipped - 21 lines]
>:Try export CLASSPATH="/jaf-1.0.2/activation.jar;/javamail-1.3.1/mail.jar"
>:instead.
Sorry, that's incorrect.
The dot does NOT require any escaping. Since this is clearly some kind
of Unix environment, the semicolon is not used for separating jar file
entries -- use the colon instead. Also, make sure that whatever shell
is being used accepts the "export CLASSPATH" syntax. Some sh
derivatives do, but all will allow you to use "CLASSPATH=value" followed
by "export CLASSPATH". If using csh or derivative, then you should see
a doctor quickly. :-) And use "setenv" instead.
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama
>I know that I have permission to the files because I am the root user
>and I finally got pissed and chmod 777 both files. I know I don't
>need execute permissions but I am sick of this crap. Java should be
>able to set its own classpath to these utilities. Maybe one day......
it does. Just put a copy in Java's ext directories.
See http://mindprod.com/jgloss/classpath.html
That is much easier than maintaining a giant classpath.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.