Debian supports FreeJava
This page contains some remarks about projects I made for my trainees (I teach Java) to be able to run on Free Java Virtual Machines
Thread Stress Test (Tombe la neige - Snow falling)
What is it?
This is a little Java program using threads intensively to simulate the wind and the weightlessness. Another thread draw the background image and the snow falling.
Get it and run
Download the program and the sources here: tombelaneige.jar. There are two ways to run the program:
$YOURJVM -jar tombelaneige.jarif
$YOURJVMsupport the-jarargument (kaffe, java-sablevm, gij)$YOURJVM -classpath tombelaneige.jar ste.tombelaneige.Mainif it does not support the
-jarargument.
Note: if you don't have fastjar
or another jar tool, you can unjar with
zip!
Results
The java.awt.Graphics2D ClassCastException
In class ste.tombelaneige.TombeLaNeige
(extends javax.swing.JPanel), I override
public void paintComponent(Graphics g). On non free JVM's,
the java.awt.Graphics is a son of
java.awt.Graphics2D. To be more precise, on the IBM
JDK 1.4.2 on powerpc, it a sun.java2d.SunGraphics2D.
On free VM's based on GNU Classpath, it's a
gnu.java.awt.peer.gtk.GdkGraphics. This class extends
java.awt.Graphics and not java.awt.Graphics2D. I don't know if it's
the real problem or if there are some other more complexe issues
about that.
JVM's that run
gij-wrapper-3.4 (3.4.3-2)
Take a lot of the processor resources; flash the screen;
the background image does not have the right colors.
The -jar works. The JMenu was good.
java-sablevm (1.1.6-6)
Same as gij but slower (really slow).
The -jar works.
kaffe (1.1.4.PRECVS5-1)
First I thought it does not work, because the panel was white, blank.
But after some time, I saw some snow, but it was maybe too cold...
the snow was frozen! ;-) But when the background image appears, the
colors were good. kaffe also took all my cpu!
The -jar works. The JMenu was good.
JVM's that don't
jamvm (1.2.0-3)
Jamvm opens the JFrame and then fails with no output.