This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Problems with log4j
- From: Andrew Haley <aph at redhat dot com>
- To: Al Niessner <Al dot Niessner at jpl dot nasa dot gov>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 4 Jan 2007 10:30:16 +0000
- Subject: Re: Problems with log4j
- References: <1167855135.6113.31.camel@localhost>
Al Niessner writes:
>
> I am trying to build up a standalone executable with gcj 4.1.0. I am in
> the process of building all of the JAR files that I include in my
> classpath when I do a 'java -cp ... MyClass' where 'java -version' gives
> me:
>
> java version "1.4.2_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
> Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
>
> Knowing that I have all that I need from a Java perspective, I then try
> to compile the JAR files that are in my class path. The first one
> compiles just fine because it depends on nothing else. The second one is
> log4j (1.2.8) and I get this error:
What command did you use to do the compile?
> org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find
> file for class javax.management.MBeanRegistration
That's a Java 1.5 class. gcj 4.1.0 is (mostly) compatible with java 1.4.
> So, I installed a "newer" version (1.2.12) of the same library and now
> get:
> org/apache/log4j/net/SMTPAppender.java: In class
> 'org.apache.log4j.net.SMTPAppender':
> org/apache/log4j/net/SMTPAppender.java: In method
> 'org.apache.log4j.net.SMTPAppender.activateOptions()':
> org/apache/log4j/net/SMTPAppender.java:0: error: cannot find file for
> class javax.mail.internet.MimeMessage
> org/apache/log4j/net/SMTPAppender.java:0: confused by earlier errors,
> bailing out
I'm not sure where javax.mail.internet.MimeMessage is supposed to come
from.
>
> Has anyone compiled log4j with gcj and, if so, which version of log4j
> and gcj?
I've used log4j, yes, but I can't see the archive at the moment to
determine which version.
Andrew.