Compilation error
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Basavaraj_Bass
Posted On:   Thursday, October 17, 2002 09:12 AM

I am trying to compile the below javamail example in jdeveloper. But i am getting compilation errors. I downloaded javamail1.1.3 and jaf1.0.2 , i unzipped it and placed activation.jar and mail.jar in my classpath(java1.2/jre/lib/ext) (jDeveloper contains jdk1.2.2) <%@ page import="java.util.*" %> <%@ page import="javax.mail.*" %> <%@ page import="javax.mail.internet.*" %> <%@ page import="javax.activation.*" %> <% Properties props = new Properties(); props.put("mail.smtp.host", "xxx.smtp.com"); Session s = Session.getInstance(props,null)   More>>

I am trying to compile the below javamail example in jdeveloper. But i am getting compilation errors.

I downloaded javamail1.1.3 and jaf1.0.2 , i unzipped it and placed activation.jar and mail.jar in my classpath(java1.2/jre/lib/ext)

(jDeveloper contains jdk1.2.2)



<%@ page import="java.util.*" %>

<%@ page import="javax.mail.*" %>

<%@ page import="javax.mail.internet.*" %>

<%@ page import="javax.activation.*" %>


<%

Properties props = new Properties();

props.put("mail.smtp.host", "xxx.smtp.com");

Session s = Session.getInstance(props,null);



MimeMessage message = new MimeMessage(s);



InternetAddress from = new InternetAddress("xxxx@xxxx.com");

message.setFrom(from);

InternetAddress to = new InternetAddress("xxxx@xxxx.com");

message.addRecipient(Message.RecipientType.TO, to);



message.setSubject("Test from JavaMail.");

message.setText("Hello from JavaMail!");



Transport.send(message);

%>




These are the errors i am getting



D:Program FilesOracleJDeveloper 3.2mailsimplemail.jsp



Error: (9) class Session not found in class mail.simplemail.

Error: (9) variable Session not found in class mail.simplemail.

Error: (12) class MimeMessage not found in class mail.simplemail.

Error: (12) class MimeMessage not found in class mail.simplemail.

Error: (14) class InternetAddress not found in class mail.simplemail.

Error: (14) class InternetAddress not found in class mail.simplemail.

Error: (16) class InternetAddress not found in class mail.simplemail.

Error: (16) class InternetAddress not found in class mail.simplemail.

Error: (17) identifier Message.RecipientType not found.

Error: (22) variable Transport not found in class mail.simplemail.


Can any one tell me what mistake i did.

Thanks,

Bass

   <<Less

Re: Compilation error

Posted By:   John_Zukowski  
Posted On:   Wednesday, November 20, 2002 11:19 PM

Make sure the JAR files are in the web server's classpath, not yours.
About | Sitemap | Contact