1 Installing GNU Classpath - Last updated: June 19, 2006
3 First, this is a development release only! Unless you are interested in
4 active development and debugging, or just like running random alpha code,
5 this release is probably not for you. Please see the README file for a
6 list of VMs that work with GNU Classpath.
8 Note that if you are building from a non-released (CVS) version of GNU
9 classpath, installation instructions are found in the doc/hacking.texi
10 file. Or at http://www.gnu.org/software/classpath/docs/hacking.html
12 ------------------------------------------------------------------
14 ------------------------------------------------------------------
15 GNU make ("gmake") is required for building Classpath.
17 For any build environment involving native libraries, these
18 new versions of autoconf, automake, and libtool are required
19 if changes are made that require rebuilding configure, Makefile.in,
20 aclocal.m4, or config.h.in.
26 When working from CVS you can run the above tools by executing
27 ./autogen.sh in the source directory.
29 For building the Java bytecode (.class files), one of these
30 compilers are required. You can select which compiler using
31 --with-jikes, --with-gcj, --with-ecj or --with-kjc as argument to
32 configure; the present default is gcj.
34 - GCJ 4.0+ (part of the GNU GCC package).
36 - Eclipse Compiler for Java 3.1+
37 - The kjc compiler is supported with configure but we have
38 been unable to successfully compile with it.
40 IMPORTANT: Versions of GCJ which are earlier than 4.0 contain
41 bugs which make it impossible to compile the class library and
42 are *not* supported any more. If you are stuck on a system where
43 GCC 3.x is the system compiler we recommend using Jikes.
45 For building the gtk+ AWT peer JNI native libraries, the following
46 are required unless --disable-gtk-peer is used as an argument to
49 - GTK+ 2.8.x (or higher)
52 - XTest Extension (libXtst) for GdkRobot support in java.awt.
54 For building gcjwebplugin you'll need the Mozilla plugin
55 support headers and libraries.
57 The GConf-based backend for java.util.prefs needs the following
60 - gconf 2.11.2 (or higher)
62 For building the Qt AWT peer JNI native libraries you have to
63 specify --enable-qt-peer and need the following library:
67 For building the X AWT peers see information below
68 (Building and running with the X AWT peers). You will need
69 the Escher 0.2.3 library:
70 http://escher.sourceforge.net
72 Please note that at the moment most operating systems do not
73 ship Qt4 by default. We recommend using GNU Classpath' Qt4
74 support only for its developers and bug reporters. See
75 http://developer.classpath.org/mediation/ClasspathShowcase
76 for details on how to get it to work.
78 For building the xmlj JAXP implementation (disabled by default, use
79 configure --enable-xmlj) you need the following installed:
80 - The XML C library for Gnome (libxml2)
81 http://www.xmlsoft.org/
82 Minimum version of libxml2 required: 2.6.8
84 - The XSLT C library for Gnome (libxslt)
85 http://www.xmlsoft.org/XSLT/
86 Minimum version of libxslt required: 1.1.11
88 For building the documentation you will need
90 - texinfo 4.2 or higher.
92 For building the ALSA midi provider code you will need
93 ALSA. http://www.alsa-project.org.
95 For building the DSSI midi synthesizer provider code you will
96 need DSSI from http://dssi.sourceforge.net. This, in turn,
97 introduces many dependencies, including:
99 - liblo: the Lightweight OSC implementation
100 http://plugin.org.uk/liblo/
102 - LADSPA: Linux Audio Developer's Simple Plugin API
103 http://www.ladspa.org
105 - the JACK Audio Connection Kit: A low latency audio server
106 http://jackit.sourceforge.net
108 - libsndfile: an audio file I/O library
109 http://www.mega-nerd.com/libsndfile/
111 - fluidsynth: a real-time SoundFont 2 based soft-synth
112 http://www.fluidsynth.org/
115 This package was designed to use the GNU standard for configuration
116 and makefiles. To build and install do the following:
118 1). Run the "configure" script to configure the package. There are
119 various options you might want to pass to configure to control how the
120 package is built. Consider the following options, "configure --help"
121 gives a complete list.
123 --enable-java compile Java source default=yes
124 --enable-jni compile JNI source default=yes
125 --enable-gtk-peer compile GTK native peers default=yes
126 --enable-qt-peer compile Qt4 native peers default=no
127 --enable-default-toolkit
128 fully qualified class name of default AWT toolkit
130 --enable-xmlj compile native libxml/xslt library default=no
131 --enable-load-library enable to use JNI native methods default=yes
132 --enable-local-sockets enable build of local Unix sockets
133 --with-jikes to compile the class library using jikes
134 the default is to use gcj
135 --with-glibj define what to install (zip|flat|both|none)
137 --with-escher=/path/to/escher
138 enable build of the X/Escher peers, with
139 the escher library at /path/to/escher, either
140 in the form of a JAR file, or a directory
141 containing the .class files of Escher.
142 --enable-Werror whether to compile C code with -Werror which turns
143 any compiler warning into a compilation failure
145 --with-gjdoc generate documentation using gjdoc default=no
146 --with-jay Regenerate the parsers with jay must be given the
147 path to the jay executable
148 --with-glibj-zip=ABS.PATH
149 use prebuilt glibj.zip class library
151 For more flags run configure --help.
153 2). Type "gmake" to build the package. There is no longer a
154 dependency problem and we aim to keep it that way.
156 3). Type "gmake install" to install everything. This may require
157 being the superuser. The default install path is /usr/local/classpath
158 you may change it by giving configure the --prefix=<path> option.
160 Report bugs to classpath@gnu.org or much better via Savannah at this
161 URL: http://savannah.gnu.org/support/?func=addsupport&group=classpath
165 Once installed, GNU Classpath is ready to be used by any VM that supports
166 using the official version of GNU Classpath. Simply ensure that
167 /usr/local/classpath/share/classpath is in your $CLASSPATH environment
168 variable. You'll also have to set your LD_LIBRARY_PATH
169 variable (or similar system configuration) to include the Classpath
170 native libraries in /usr/local/classpath/lib/classpath.
172 *NOTE* All example paths assume the default prefix is used with configure.
173 If you don't know what this means then the examples are correct.
175 LD_LIBRARY_PATH=/usr/local/classpath/lib/classpath
176 CLASSPATH=/usr/local/classpath/share/classpath/glibj.zip:.
177 export LD_LIBRARY_PATH CLASSPATH
179 More information about the VMs that use GNU Classpath can be found in the
182 ------------------------------------------------------------------
183 Building and running with the X AWT peers
184 ------------------------------------------------------------------
186 In order build the X peers you need the Escher library version 0.2.3
187 from http://escher.sourceforge.net . Unpack (and optionally build) the
188 Escher library following the instructions in the downloaded
189 package. Enable the build of the X peers by passing
190 --with-escher=/path/to/escher to ./configure where /path/to/escher
191 either points to a directory structure or JAR file containing the
192 Escher classes. For Unix systems it is preferable to also build local
193 socket support by passing --enable-local-sockets, which accelerates
194 the network communication to the X server significantly.
196 In this release you have to enable the X peers at runtime by
197 setting the system property awt.toolkit=gnu.java.awt.peer.x.XToolkit
198 by passing -Dawt.toolkit=gnu.java.awt.peer.x.XToolkit to the java
199 command when running an application.
201 ------------------------------------------------------------------
203 ------------------------------------------------------------------
204 Compilation is accomplished using a compiler's @file syntax. For our
205 part, we avoid placing make style dependencies as rules upon the
206 compilation of a particular class file and leave this up to the Java
209 The --enable-maintainer-mode option to configure currently does very
210 little and shouldn't be used by ordinary developers or users anyway.
212 On Windows machines, the native libraries do not currently build, but
213 the Java bytecode library will. Gcj trunk is beginning to work under
214 Cygwin. The mingw32 version of jikes cannot follow symbolic links, you
215 must use a cygwin build of jikes to access this limited functionality.