struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart" <lukasz.len...@googlemail.com>
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:

package pl.org.lenart;

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
named MailSender.java

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


Regards
-- 
Lukasz
http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message