classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Classpath 0.08 - How to use it


From: Mark Wielaard
Subject: GNU Classpath 0.08 - How to use it
Date: Sat, 13 Mar 2004 18:51:01 +0100

Hi all,

On Sat, 2004-03-13 at 04:38, Mark Wielaard wrote:
> We are pleased to announce a new development release of GNU Classpath.

So you downloaded it all from ftp://ftp.gnu.org/gnu/classpath/ checked
the signature, unpacked it, made sure you had all pre-requirements
described in the INSTALL file, did a configure, make and make install.
Then you took a look at http://www.gnu.org/software/classpath/tasks.html
decided what you would like to hack on and thought: "Hmmmm, now what?"

Glad, you asked!

Normally developers that just look for a java-like environment for the
GNU platform would install GCC which comes with lots of different
programming language support, including gcj and gij which provide a
(native and byte code) compiler and a byte code interpreter for the java
programming language (and [grep]jar, gcjh, jcf-dump, jv-convert,
jv-scan, rmic and other tools). Since GCC 3.3 I believe gcj is mature
enough to recommend it as the preferred way to write free software for
the GNU platform using the java programming language and the GNU
Classpath core libraries. Another popular option is of course kaffe
which is now also (partially) based on GNU Classpath core libraries (and
comes with even more tools then gcj at the moment).

But you are probably asking because you want to hack on the GNU
Classpath core libraries directly, even though in practice you would use
a whole programming environment for development and not just the core
libraries. The fact that GNU Classpath is used by such a wide variety of
compilers and runtime environments is both its strength and its
weakness. Our strength is that we get ideas, bug fixes and improvements
from a whole lot of projects based on GNU Classpath (see the huge list
at http://www.gnu.org/software/classpath/stories.html). I believe this
has made GNU Classpath a very rich and robust library. GNU Classpath is
now a cornerstone of a lot of innovative free software development and
it will bring us, combined with gcc, gcj, gij, emacs, java-gnome, etc, a
powerful java-like environment for the GNU system, while also helping
out other free software projects. But our weakness is that it doesn't
actually make much sense to hack on GNU Classpath directly. We provide
just one of the building blocks, you need compilers, editors, runtime
environments, extension libraries and programs to make it useful.

So one of the things to do when you want to contribute to GNU Classpath
is to do it through one of the projects that already combines GNU
Classpath with other tools like GCJ or Kaffe (or IKVM.NET, Kissme,
SableVM, ...) and just hack on those and/or make other free software
libraries and programs work with them. Your contributions will slowly
flow to GNU Classpath and the other environments in that case.

For the 0.08 release I made sure that at least one environment was
capable of running (more or less) out of the box with GNU Classpath and
Mauve. So you can now actually work on the core classes directly and
test against the main major textual and graphical test-suites we use. 
Or compare the test results of a more or less pure GNU Classpath
against another integrated development environment based on it.
Below are the instructions to do that if you wish.

INSTALL GNU CLASSPATH 0.08
--------------------------
- Download ftp://ftp.gnu.org/gnu/classpath/classpath-0.08.tar.gz
  (and ftp://ftp.gnu.org/gnu/classpath/classpath-0.08.tar.gz.sig
   if you want to do a gpg --verify classpath-0.08.tar.gz.sig)
- tar zxf classpath-0.08.tar.gz
- cd classpath-0.08
- Read the INSTALL file to make sure you have all pre-requirements.
- ./configure && make && make install
  (Read ./configure --help for some of the options you can give,
   for example --prefix=/some/other/install/dir and --disable-gtk-peer
   if you don't have all the required gtk+/gnome libs)

INSTALL JAMVM 1.1.1
-------------------
- Download
http://heanet.dl.sourceforge.net/sourceforge/jamvm/jamvm-1.1.1.tar.gz
- tar zxf jamvm-1.1.1.tar.gz
- cd jamvm-1.1.1
- patch -p0 < VMClassLoader.patch (attached to this email)
  [This step is only necessary if you want to try out the new regex
   support. It makes sure the bootstrap classloader can load some
   property files needed by gnu.regex. It isn't the nicest solution, but
   it works for now. Robert will probably come up with a better patch.
   The patch assumes that classpath is installed in the default
   location, please edit VMClassLoader.java if you used a --prefix
   argument while installing classpath above.]
- ./configure && make && make install
  (Read the INSTALL file for configure options like
   --classpath_install_dir=/some/dir when you installed GNU Classpath
   with a non-default --prefix)

Now don't forget to UNZIP the GNU Classpath glibj.zip file.
[This is only necessary for runtime environments like jamvm that don't
support zip files for their bootstrap classes. YOU WILL FORGET THIS ONE
TIME DURING DEVELOPMENT. Be prepared!]

- cd /usr/local/classpath/share/classpath/
- unzip glibj.zip

Make sure /usr/local/bin is in your path and you should be able to write
a simple
- echo 'public class Hello { public static void main(String[] args) { 
System.out.println("Hello World!"); } }' > Hello.java
Compile it with
- gcj -C Hello.java
or
- jikes --bootclasspath /usr/local/classpath/share/classpath/glibj.zip 
Hello.java
And run it with
- jamvm Hello

INSTALL MAUVE
-------------

- export CVSROOT=:pserver:address@hidden:/cvs/mauve
- cvs login (password anoncvs)
- cvs checkout mauve
- cd mauve
- ./configure
  (The main thing this does is creating the gnu/testlet/config.java
   You could also do this by hand from the config.java.in file)
- Edit the script 'batch_runner' to set the variable COMPILER correctly
  (there are a couple of example settings)
- Edit script 'runner' to set the variable RUNTIME correctly
  (there are a couple of example settings)
- run ./batch_run and look at the results.
  (11135 PASSes and 227 FAILs)

Full results (60K gzipped) for my system can be found at
http://www.klomp.org/mark/classpath/jamvm-1.1.1-cp-0.08.results.gz

You can also run individual tests by:
- echo gnu.testlet.java.lang.String.getBytes | jamvm 
gnu.testlet.SimpleTestHarness
(Option flags are -verbose and -debug)

[NOTE. This is an alternative method of running Mauve tests. The README
in the mauve directory explains another method.]

INSTALL VISUAL TEST ENGINE (AWT)
--------------------------------

Almost the same as above (export CVSROOT and cvs login should be done
already).
- cvs checkout wonka
- cd wonka
- Read the README
- jikes -bootclasspath /usr/local/classpath/share/classpath/glibj.zip \
        `find com -name \*.java`
- jamvm com.acunia.wonka.test.awt.VisualTestEngine `cat tests.list`
- Click around! [Yes, I know the colors are painful to the eyes...]

Happy Hacking!

Mark

P.S. I am a bit behind email. The 0.08 release took much time. I am
taking the rest of the day off now. So please be patient if you are
waiting on some email related to GNU Classpath from be. I try to catch
up as quick as I can starting tomorrow.

Attachment: VMClassLoader.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]