This section describes how to build
JGloss
from the sources. You do not need to read
it if you just want to use
JGloss
and have downloaded the binary release
(no
-src
ending).
To build the
JGloss
JAR file, you have to have the
Java Development Kit 1.4
from Sun (or something compatible)
installed. To create the
documentation files from
jgloss.docbook
you need the DocBook 4.1 DTD and various DocBook tools. Look for them at
the
OASIS site
,
Norman Walsh
's site and
the
DocBook tools page
,
or on your favorite Linux distribution's CD-ROMs.
The sources come with a
Makefile
which automates the build process.
The Makefile is written for a GNU/Linux system, but should work on other systems with
the GNU tools or equivalent commands installed. Here is an (incomplete) list of
make targets:
Creates the JGloss JAR archive. This is the default make target.
Builds the JGloss-WWW servlet. The components will be placed in the
jgloss-www
directory. This is an experimental servlet
which rewrites Japanese web pages. Words in the page are looked up in
the dictionaries and annotated with the lookup results. JavaScript is
used to display the result in the browser. You can find documentation for the servlet in
src/www/index.html
.
Generates the documentation files from
doc.src/jgloss.docbook
Generates the javadoc documentation for the JGloss source files.
Creates the source and binary distribution zip and tgz files.
If you can't use the Makefile, you can build the JGloss JAR archive by hand. Use
javac
to compile the
*.java
files in the
src
directory. Use
native2ascii
to convert
every
.properties.in
file in the
src/resources
directory to a
.properties
file using the
ASCII
charset. The native charset of the file is specified in the first line of the
input file. Then use
jar
to build a JAR archive, using the
MANIFEST.MF
file as manifest (see
jar
options).
Make sure that the
resources
and
data
directories are included in the archive.