struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart" <>
Subject Re: Java Mail errors
Date Tue, 23 Sep 2008 12:26:54 GMT
>                is it public static void main() what you are saying. is it
> required for every class?

Not exactly, the method main() is needed if you want to launch the
program (it's a entry point to your application), but if you writing
Java class which will be used with server or with some other framework
(like Struts), you don't have write such method.

Bassicly  each Java class should looks like this:


import javax.mail.*
import some.other.packages.*

public class MailSender {

  public void sendMail() {
    // method body


and such code has to be saved in directory pl/org/lenart and file

This is the basic Java knowledge so please follow the link and learn
how to write programs in Java


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message