Hello Christian,

Christian Kindler <vorarlber...@gmail.com> wrote on 07/01/2011 12:45:19 PM:

> Hello
>
> When I try to compile xerces-sources-2.8.1.jar I catch the following
errors:

We don't distribute such a jar. I'm not sure where you got this from.

> ./org/apache/html/dom/HTMLIFrameElementImpl.java:27:
> org.apache.html.dom.HTMLIFrameElementImpl is not abstract and does
> not override abstract method getContentDocument() in
> org.w3c.dom.html.HTMLIFrameElement
> public class HTMLIFrameElementImpl
>        ^
> ./org/apache/html/dom/HTMLFrameElementImpl.java:27:
> org.apache.html.dom.HTMLFrameElementImpl is not abstract and does
> not override abstract method getContentDocument() in
> org.w3c.dom.html.HTMLFrameElement
> public class HTMLFrameElementImpl
>        ^
> ./org/apache/html/dom/HTMLObjectElementImpl.java:27:
> org.apache.html.dom.HTMLObjectElementImpl is not abstract and does
> not override abstract method getContentDocument() in
> org.w3c.dom.html.HTMLObjectElement
> public class HTMLObjectElementImpl
>        ^
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 3 errors

This is a problem with your classpath. Some JDKs contain a level of the DOM
HTML APIs which are incompatible with the official version from the W3C.
Special care needs to be taken when compiling to avoid this conflict.

> How can I get around this?

I would suggest that you follow this FAQ [1]. You should have a much easier
time compiling the source if you use Xerces' build scripts. With build.sh
you only need to set JAVA_HOME. It takes care of the classpath setup.

> I am on a 64 Bit CentOS Linux using the oracle java 1.5 compiler
> $ORACLE_HOME/jdk/bin/javac -version
> javac 1.5.0_17
> javac: no source files
> Usage: javac <options> <source files>
>
> and this is my compile sctript <compile.sh>:
> #!/bin/bash
>
> #add priviously compiled jars to cp
> echo ../bin/`ls ../bin/` | sed -e's/\s/:\.\.\/bin\//g' > /tmp/jars
> CP=`cat /tmp/jars`
>
> export JAVA_HOME=$ORACLE_HOME/jdk
> export CLASSPATH="$CP"
>
> BCP="$ORACLE_HOME/jdk/jre/lib/rt.jar:$ORACLE_HOME/jdk/lib/tools.jar"
> echo $CLASSPATH
> echo `pwd`
>
> find -name "*.java" > source;
> echo $ORACLE_HOME/jdk/bin/javac -source 1.5 -nowarn -classpath "$CP"
> -J-Xms256m -J-Xmx256m @source
> $ORACLE_HOME/jdk/bin/javac -source 1.5 -nowarn  -J-Xms256m -J-Xmx256m
@source
>
> Thank you very much
> Christian Maier

Thanks.

[1] http://xerces.apache.org/xerces2-j/faq-build.html#faq-2

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Reply via email to