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)

Val Benoit, where I work

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:

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

Gjdoc (in the latest kaffe package PRECVS6)

GJdoc hangs forever with some java classes. Here is a repository with the classes I wrote and give troubles to gjdoc: gjdoc_hangs_forever

Valid XHTML 1.0! Arnaud Vandyck Last modified: Thu Aug 18 00:21:51 CEST 2005