Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with JavaMail  RSS feed

 
Brian K Swingle
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I'm just trying to get JavaMail set up and i'm having trouble. When i'm try to compile my servlet i get the usual message of.

Javax.mail does not exist.
Javax.mail.internet does not exist.
javax.activation does not exist.

My classpath is set correctly to.

d:\jsdk2.1\servlet.jar;.d:jsdk2.1\server.jar;.d:\jsdk2.1\mail.jar;.d:jsdk2.1\activation.jar;.%classpath%"i\QTJava.zip;"

and thats the exat dir they are in i've double checked it ten times.
what do you think could be causeing these jar's not to be found?
any help is most appreciated. I'm in hell right now.

Best Regards,
Brian Swingle
 
Rovas Kram
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have a '.' before 'd:' in the classpath. Can that be the right syntax?
 
Brian K Swingle
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I removed the periods but still the same error on compilation. I have no issue with any of the other jar's in my classpath exept the mail and activation jar's.

It weired i dont get it.
 
Rovas Kram
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your complete command that your using to compile your servlet?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
d:\jsdk2.1\servlet.jar;.d:jsdk2.1\server.jar;.d:\jsdk2.1\mail.jar;.d:jsdk2.1\activation.jar;.%classpath%"i\QTJava.zip;"

Here is what looks strange to me.

d:\jsdk2.1\servlet.jar
d:jsdk2.1\server.jar
etc

d:\ - means look at the root of D and then j2sdk2.1
d: - means look at the current directory then jsdk2.1

 
Brian K Swingle
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have it configured trough the tools section in editplus. I've used this to compile a ton of my servlets before. i'll post the properties for it anyway.

Name: Java Compiler
Command: D:\j2sdk1.4.1_06\bin\javac.exe
Arguement: $(FileName)
Initial Directory: $(FileDir)


Here is everyhting i'm importing into the servlet.

import java.io.*;
import java.text.*;
import java.util.*;
import java.util.Random;
import javax.servlet.*;
import javax.servlet.http.*;
import snaq.db.*;
import java.sql.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Hashtable;
import java.util.Properties;

The only packages it cant find are the 3 for the JavaMail.Thanks for all your guys help and continued help. I'm totaly stumped on this one.

Best Regards,
Brian Swingle
 
Brian K Swingle
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Gregg,
I never noticed that. I tried it both way and its still the same situation the compiler finds everything but the 3 jars needed for javamail.

Should i be restarting my system after changing the Classpath?

Thanks,
Brian Swingle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!