You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Osvaldo Brito <os...@laplace.inesc.pt> on 2000/10/03 10:52:46 UTC

javac

Hi,

I'm using the javamail api for the first time, and i'll appreciate very
much if you you could help me compiling my first java source. I'm working
on linux, and i wrote the following test program:


import javax.mail.internet.*;
                        //Mimemessage
import javax.mail.*;
                        //Session
import java.util.*;
import java.io.*;
                                           //FileInputStream
import java.lang.*;
                                        //System

/* ficheiro msg.java: le 1 mensagem mime de 1 ficheiro mime e escreve no
ecran a mensagem

*/
public class msg {

          FileInputStream mimeStream =
  try {
          mimeStream=new FileInputStream(
                new File(
"/home/osvaldo/javamail/javamail-1.1.3/correio.txt" ));}
          catch (Exception e) {
                System.err.println(e.getMessage());
                System.exit(0);}

  /* get a properties object */
//  Properties props = new 
System.getProperties();  throws=SecurityException

        Properties props =
  try {
        props = new System.getProperties();}
        catch(Exception e) {
                System.err.println(e.getMessage());
                System.exit(0);}

  /* get a session object */
  Session session =new Session.getDefaultInstance ( props, null );

 /* criacao do objecto do tipo mimemesage */
  mimemsg = new MimeMessage(session, mimefile); //throws
MessagingException

  /*escrita da mensagem no escran*/
  mimemsg.WriteTo (System.out);
}


when i run, javac msg.java i get this stdout,

osvaldo [/home/osvaldo/javamail/javamail-1.1.3/work] > javac msg.java
java.lang.NoClassDefFoundError: antlr/collections/AST
        at at.dms.kjc.Main.beautifyParseError(Main.java:692)
        at at.dms.kjc.Main.parseFile(Main.java:488)
        at at.dms.kjc.Main.run(Main.java:119)
        at at.dms.kjc.Main.compile(Main.java:449)
        at at.dms.kjc.Main.main(Main.java:432)


Any help? Thanks in advance for reading this mail.   



-- 
Osvaldo Brito

                                


Re: javac

Posted by Holger Klawitter <ho...@klawitter.de>.
> osvaldo [/home/osvaldo/javamail/javamail-1.1.3/work] > javac msg.java
> java.lang.NoClassDefFoundError: antlr/collections/AST
>         at at.dms.kjc.Main.beautifyParseError(Main.java:692)
>         at at.dms.kjc.Main.parseFile(Main.java:488)
>         at at.dms.kjc.Main.run(Main.java:119)
>         at at.dms.kjc.Main.compile(Main.java:449)
>         at at.dms.kjc.Main.main(Main.java:432)

This is quite obvoiusly a problem with your java compiler and has
nothing to do with either tomcat or javamail. It seems that one
of of jarfiles belonging to your compiler is missing in your classpath
you are unsing on your shell prompt.

Regards,
Mit freundlichem Gruß,
	Holger Klawitter
--
Holger Klawitter                                    +49 (0)251 484 0637
holger@klawitter.de                            http://www.klawitter.de/