logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: jaxp.jar and parser.jar?
Date Fri, 16 Sep 2005 03:27:52 GMT

On Sep 15, 2005, at 4:35 PM, lawrence@marchex.com wrote:

> I made some minor modifications to the source code and I'm trying  
> to build a new jar file.   I'm getting this error:
>
> javac: target release 1.1 conflicts with default source release 1.5
>
> Which I assume means I need to install jdk1.1 (fun).
>

-source specifies what version of the Java language that are  
compiling and -target specifies the version of Java byte code you  
want generated.  Prior to log4j 1.2.12, only target was specified  
basically requesting that regardless of the compiler being used only  
JDK 1.1 compatible byte-code be generated.  That worked fine for JDK  
1.4 and earlier compilers since they could each convert their default  
source version to JDK 1.1 compatible byte code.  However, the JDK 1.5  
compiler does not support generating JDK 1.1 compatible byte-code  
from JDK 1.5 source, but will if the source is specified as 1.4 or less.


On Sep 15, 2005, at 4:49 PM, lawrence@marchex.com wrote:
> Ok, I changed target to 1.5, and all is well until it gets to:
>
> build.jmx:
>     [javac] Compiling 7 source files to /home/lawrence/eclipse/ 
> workspace/log4j/dist/classes
>     [javac] /home/lawrence/eclipse/workspace/log4j/src/java/org/ 
> apache/log4j/jmx/Agent.java:22: package com.sun.jdmk.comm does not  
> exist
>     [javac] import com.sun.jdmk.comm.HtmlAdaptorServer;
>     [javac]                          ^

The build.xml attempts to detect if Java Management Extension is in  
the classpath by checking for a specific class and if not present  
will skip compiling the JMX support classes.  Unfortunately, the test  
in log4j 1.2.11 and earlier fails on JDK 1.5 since the class tested  
is present in the JDK library, but other classes like  
com.sun.jdmk.comm.HtmlAdapterServer are not.  log4j 1.2.12 refines  
the test to check for both.

Both these issues with compiling on JDK 1.5 are resolved in log4j  
1.2.12.  I would recommend that you start with that instead of using  
log4j 1.2.11.

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


Mime
View raw message