Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2004 12:09:52 -0800
From:      Kyle VanderBeek <kylev-bsdjava@kylev.com>
To:        freebsd-java@lists.freebsd.org
Subject:   Re: xdoclet and jdk1.3
Message-ID:  <20040326120952.W29963@kylev.com>
In-Reply-To: <20040325102847.M29963@kylev.com>; from kylev-bsdjava@kylev.com on Thu, Mar 25, 2004 at 10:28:47AM -0800
References:  <20040325003308.L29963@kylev.com> <20040325091912.GA11133@phantom.cris.net> <20040325102847.M29963@kylev.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 25, 2004 at 10:28:47AM -0800, Kyle VanderBeek wrote:
> On Thu, Mar 25, 2004 at 11:19:12AM +0200, Alexey Zelkin wrote:
> > Sometimes this problem appears then compiled code expects to be executed
> > under jdk1.4.  Try it first.
> 
> Thanks for the hint.  First I'm going to try to compile my own XDoclet
> .jars under the 1.3 VM and see what happens when using them.  Hopefully 
> it's just a mistake on the part of the XDoclet release manager, using a 
> 1.4 JDK.

For the sake of google, and other seekers of knowledge, I'll post my 
solution.  It does looks like xjavadoc was compiled under a 1.4 SDK, but 
has no (real) reason to be.  I managed to create my own 1.3.1-compiled 
xjavadoc .jar, and replaced the one in my expanded xdoclet lib 
directory.  Now, using xdoclet under ant works on my BSD machines.

The machine is FreeBSD 4.9-RELEASE-p1 with java 1.3.1p8.

Since it is non trivial, I'll post what I did here:

1) Check out the xjavadoc 1.0.2 version, which is what xdoclet-1.2 
comes with:

cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/xdoclet export -r XJAVADOC_1_0_2  xjavadoc

2) Edit the build.xml so that the "jar" target depends on "compile"  
instead of "junit".  Else you have to make junit work in ant.  Why there 
isn't a regular non-test compile method in xjavadoc is beyond me.

3) Build with javac 1.3.1, adding xalan and xerces as transformer and 
XML tools respectively.  You have to do this because 1.3.1 doesn't come 
with this built in (1.4 does).  All one line:

ANT_OPTS="-cp 
/home/kylev/cvswork/is/3rd_party/java/xerces-2_5_0/xercesImpl.jar:lib/xalan.jar 
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl 
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl 
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl" 
ant

4) Enjoy the glory of a non-sucking target/xjavadoc-1.0.2.jar !  Drop it 
in place in your xdoclet-1.2/lib directory, and hack away.

-- 
kylev@kylev.com
  Some people have a way with words, while others... erm... thingy.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040326120952.W29963>