javax.mail, classpath and classpathx

chris burdess
Mon Oct 27 15:02:00 GMT 2003

Øyvind Harboe wrote:
> Has anyone had any luck in getting javax.mail classes compiled from GNU
> classpath?
> ...
> - I fetched the files for classpathx from CVS and tried to compile.
> After some fiddling around, I discovered how to get ./configure + make
> going and I ended up with various .jar files. First I tried and failed
> this under CygWin, but then I remembered my Linux machine in the closet
> and voila!

what fiddling did you need to do? i.e. why did a straight ./configure &&
make fail?

> - Alas, it appears that GCJ classpath compilation does not include the
> classpath/inetlib classes. My attempts to compile classpath failed.

no, inetlib is a separate module.

> // This is the first "missing class" from classpathx javax.mail
> java.lang.NoClassDefFoundError: gnu/inet/util/Logger	at
> javax.mail.Session.<init>(	at
> javax.mail.Session.getDefaultInstance(	at
> javax.mail.Session.getDefaultInstance(	at
> Send.main(

inetlib.jar is currently bundled as part of the classpathx mail module
and is referenced in the makefile - i don't know why you're not seeing

the only outstanding issue i'm aware of here is that classpathx
activation (on which mail depends) cannot be compiled with libgcj, as
a DataFlavor subclass overrides a static method in the libgcj
implementation. detail:

javax/activation/ error: non-static method
overrides static method

if you have gcj installed, you must explicitly set another java
compiler, e.g.

  JAVAC=javac ./configure && make
chris burdess

More information about the Java mailing list