gcc/libjava/classpath/examples
Mark Wielaard 4f9533c772 Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
       * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale.

       * sources.am: Regenerated.
       * gcj/javaprims.h: Regenerated.
       * Makefile.in: Regenerated.
       * gcj/Makefile.in: Regenerated.
       * include/Makefile.in: Regenerated.
       * testsuite/Makefile.in: Regenerated.

       * gnu/java/lang/VMInstrumentationImpl.java: New override.
       * gnu/java/net/local/LocalSocketImpl.java: Likewise.
       * gnu/classpath/jdwp/VMMethod.java: Likewise.
       * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest
       interface.
       * java/lang/Thread.java: Add UncaughtExceptionHandler.
       * java/lang/reflect/Method.java: Implements GenericDeclaration and
       isSynthetic(),
       * java/lang/reflect/Field.java: Likewise.
       * java/lang/reflect/Constructor.java
       * java/lang/Class.java: Implements Type, GenericDeclaration,
       getSimpleName() and getEnclosing*() methods.
       * java/lang/Class.h: Add new public methods.
       * java/lang/Math.java: Add signum(), ulp() and log10().
       * java/lang/natMath.cc (log10): New function.
       * java/security/VMSecureRandom.java: New override.
       * java/util/logging/Logger.java: Updated to latest classpath
       version.
       * java/util/logging/LogManager.java: New override.

From-SVN: r113887
2006-05-18 17:29:21 +00:00
..
gnu/classpath/examples Imported GNU Classpath 0.90 2006-05-18 17:29:21 +00:00
Makefile.am Imported GNU Classpath 0.90 2006-05-18 17:29:21 +00:00
Makefile.in Imported GNU Classpath 0.90 2006-05-18 17:29:21 +00:00
Makefile.jawt.in Initial revision 2005-09-23 19:36:46 +00:00
README Imported Classpath 0.18. 2005-09-23 21:31:04 +00:00

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

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.