Links
|
Building from Source
Preparation
- To build the org.clapper.util library from source, you'll need
the third-party jar files
mentioned in the
Installation document.
The easiest way to make sure you have the right files is to run the
graphical installer
and make sure you install the source code. You'll also need the
Apache Ant build tool, version
1.6.5 or better. (Ant does not come bundled in the graphical
installer.)
- After downloading the prerequisite jar files, place them in a directory
somewhere.
- Unpack the source zip file, and change your working directory to the
resulting util directory.
- In the topmost source directory (i.e., the directory containing the
build.xml file), create a
file called build.properties containing
the following line:
third.party.jar.dir: /path/to/directory/containing/jars
Building
-
- Type ant build to compile the code and create the jar file.
The jar file ends up in the build/lib subdirectory.
- To create the Javadocs, type ant javadocs. (This step is optional.)
- To create version-stamped release files, type ant release.
The resulting files end up in the build/release directory.
The Ant build.xml file is configured to use the default
Java compiler (usually "modern"). If you prefer to use
jikes,
run Ant as follows:
ant -Dbuild.compiler=jikes dist
|
WARNING: You cannot use jikes with
version 2.x of the org.clapper.util library. Jikes does not yet
compile Java source that uses new 1.5 JDK features. Jikes can
be used to compile the 1.x.x versions of this library.
|
|
See the Ant manual entry for the
<javac>
task for more information on the valid values for build.compiler.
Note: To build the graphical installer, you'll need the
izpack-compiler.jar file from the
IzPack distribution.
Possible Build Errors
- If you see the following error when compiling a 1.x.x version of this
library:
BUILD FAILED
java.lang.UnsupportedClassVersionError: org/example/somepackage/SomeClass (Unsupported major.minor version 48.0)
it usually means that you're compiling with a 1.4 JDK, and you're
using a third-party jar that was built with a 1.5 or greater JDK. To
solve this problem:
- Use a 1.5 JDK to build the org.clapper.util library,
- Get a copy of the third-party library that was built with an
older JDK, or
- Rebuild the third-party library from source (if possible), using
the same JDK you want to use to build the org.clapper.util
library
- If you see this error during the build
assertion "! array" failed: file "tuple.h", line 429
you've encountered a jikes bug. I've seen this happen with
jikes 1.21. Others on the net report a similar error with
jikes 1.20. To solve this problem, either:
- Build with javac, not jikes
- Use a newer version of jikes. If an official release
isn't available, you can get the jikes source via
anonymous CVS.
The CVS version of jikes, as of 30 September, 2004, worked
for me. Older versions of jikes may also work, but be sure
the version you use supports the -source command-line
option.
License
This software is released under a BSD-style license.
Copyright © 2004-2008 Brian M. Clapper. All rights reserved.
|