This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes Implementing JavaMail in a Servlet using NetBeans 4.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Implementing JavaMail in a Servlet using NetBeans 4.1 " Watch "Implementing JavaMail in a Servlet using NetBeans 4.1 " New topic
Author

Implementing JavaMail in a Servlet using NetBeans 4.1

Amitav Anand
Ranch Hand

Joined: Sep 22, 2003
Posts: 46
Hi ,
I am totally new to this NetBeans IDE. So please help me out for the same.
Actually I have got both the .jar files( mail.jar and activation.jar), which are required to implement the JavaMail API.
But unfortunately I don't know how to go about it.
I mean where to put those JAR files.
Its showing compile time error at the following import statements:

import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;

I got to know from somewhere that CLASSPATH is supposed to be set for these two JAR files..
But I don't know how to set the classpath in the NetBeans 4.1..
I tried to set the CLASSPATH in the catalina.bat file, which is under C:\NetBeans4.1\enterprise1\jakarta-tomcat-5.5.7\bin\catalina.bat

But unfortunately its not working...

please help me out as quickly as possible.

Thanking in anticipation..

Amitav Anand
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

For running the app as a standalone (outside of your IDE) put the jars under WEB-INF/classes.
In order to compile with Netbeans, you'll need to mount each jar.
You do this the same way you mount a filesystem, from the File Explorer pane.

There is an IDE forum on this site.
If have problems with this, they could probably help you troubleshoot the Netbeans issues better than we could.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Don't get me started about those stupid light bulbs.
 
subject: Implementing JavaMail in a Servlet using NetBeans 4.1