mirror of git://gcc.gnu.org/git/gcc.git
2013-05-22 Mark Mitchell <mark@codesourcery.com> Sandra Loosemore <sandra@codesourcery.com> libjava/ * configure.ac (dbexecdir): Base on $(toolexeclibdir), not $(libdir). * Makefile.am (pkgconfigdir): Likewise. * configure: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. libjava/classpath/ * configure.ac: Define host_noncanonical and target_noncanonical. Support --enable-version-specific-runtime-libs. * m4/acinclude.m4 (CLASSPATH_TOOLEXECLIBDIR): Match libjava definition of toolexeclibdir. * configure: Regenerated. * Makefile.in: Regenerated. * doc/api/Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * examples/Makefile.in: Regenerated. * external/jsr166/Makefile.in: Regenerated. * external/Makefile.in: Regenerated. * external/relaxngDatatype/Makefile.in: Regenerated. * external/sax/Makefile.in: Regenerated. * external/w3c_dom/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * lib/Makefile.in: Regenerated. * native/fdlibm/Makefile.in: Regenerated. * native/jawt/Makefile.in: Regenerated. * native/jni/Makefile.in: Regenerated. * native/jni/gconf-peer/Makefile.in: Regenerated. * native/jni/gstreamer-peer/Makefile.in: Regenerated. * native/jni/gtk-peer/Makefile.in: Regenerated. * native/jni/java-io/Makefile.in: Regenerated. * native/jni/java-lang/Makefile.in: Regenerated. * native/jni/java-math/Makefile.in: Regenerated. * native/jni/java-net/Makefile.in: Regenerated. * native/jni/java-nio/Makefile.in: Regenerated. * native/jni/java-util/Makefile.in: Regenerated. * native/jni/Makefile.in: Regenerated. * native/jni/midi-alsa/Makefile.in: Regenerated. * native/jni/midi-dssi/Makefile.in: Regenerated. * native/jni/native-lib/Makefile.in: Regenerated. * native/jni/qt-peer/Makefile.in: Regenerated. * native/jni/xmlj/Makefile.in: Regenerated. * native/Makefile.in: Regenerated. * native/plugin/Makefile.in: Regenerated. * resource/Makefile.in: Regenerated. * scripts/Makefile.in: Regenerated. * tools/Makefile.in: Regenerated. Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com> From-SVN: r199221 |
||
|---|---|---|
| .. | ||
| gnu/classpath/examples | ||
| .cvsignore | ||
| Makefile.am | ||
| Makefile.in | ||
| Makefile.java2d.in | ||
| Makefile.jawt.in | ||
| README | ||
README
This directory contains example programs that show how the GNU Classpath
library can be used.
Each example has its own package under gnu.classpath.examples and has a
class Demo which contains a main() method to run that particular example.
The examples can be compiled and run with gcj as follows:
gcj -o swingdemo --main=gnu.classpath.examples.swing.Demo \
gnu/classpath/examples/swing/Demo.java \
gnu/classpath/examples/swing/GNULookAndFeel.java
./swingdemo
Or with a traditional byte code interpreter like:
gcj -C gnu/classpath/examples/awt/Demo.java
gij gnu.classpath.examples.awt.Demo
The installation also comes with an examples.zip archive that contains
all needed resources and compiled byte code class files that can be
run as follows:
kaffe -classpath examples.zip gnu.classpath.examples.awt.Demo
kaffe -classpath examples.zip gnu.classpath.examples.swing.Demo
The jawt Demo needs some extra support library that currently needs to be
build by hand. The following assumes GNU Classpath was installed in
/usr/local/classpath, if you installed it somewhere else then adjust the
-I and -L paths accordingly. The included Makefile.jawt is setup this way.
You can invoke it with:
make -f Makefile.jawt
Or you can compile by hand as follows:
gcj -C gnu/classpath/examples/jawt/DemoJAWT.java
gcjh -jni gnu.classpath.examples.jawt.DemoJAWT -o DemoJAWT.h
gcc -g -O0 -Wall -I. -I/usr/X11R6/include -L. -L/usr/X11R6/lib \
-I/usr/local/classpath/include -L/usr/local/classpath/lib/classpath \
-lX11 -ljawtgnu -shared -o libDemoJAWT.so \
gnu/classpath/examples/jawt/DemoJAWT.c
You can then run the example as follows:
export LD_LIBRARY_PATH=.:/usr/local/classpath/lib/classpath
jamvm gnu.classpath.examples.jawt.DemoJAWT
The java2d benchmarking demos include a GTK widget to measure the native
speed of some basic java2d options, without the JNI overhead.
You can invoke it with:
make -f Makefile.java2d
Or you can compile by hand as follows:
gcc -g -O0 -Wall -I./gnu/classpath/examples/java2d \
-o cairobench gnu/classpath/examples/java2d/bench.c \
`pkg-config --libs --cflags gtk+-2.0`
You can then run the example as follows:
./cairobench
All example code is distributed under the GNU General Public License (GPL).
The example icons used in some of the examples come from gnome-icon-theme
version 1.2.3 and are also distributed under the GPL.
All these images are stored in the directory gnu/classpath/examples/icons/.
More free icons can be found in the gnome-icon-theme package:
http://ftp.gnome.org/pub/GNOME/sources/gnome-icon-theme/
GNU Classpath examples are free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
GNU Classpath examples are distributed in the hope that they will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath examples; see the file COPYING. If not,
write to the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.