Compilation and running
Unpack the jar file with jar -xf sudokusrc.jar
into your working directory. Then
compile all Java files with a java compiler.
(javac *.java
on some systems, or even just
javac SudokuUI
on others)
and then run the SudokuUI class using
java SudokuUI
Replace javac with the relevant compiler if you are using different
java compilers.
The file sudoku.jar contains the compiled class files (compiled with
javac in j2sdk1.4.01), so you can simply set the classpath to
include this jar file and java SudokuUI
. On my system this is simply java -cp sudoku.jar SudokuUI
Time issues.
In general the program runs quickly under j2sdk1.4.
The main issue is with generation, which calls the solve
routine multiple times (and I am talking of many hundreds
with 25x25 puzzle generation).
On my 2G Pentium 4 it may take
a few minutes to generate a VH symmetric 25x25 puzzle.
Generating a puzzle with less symmetry takes longer.
9x9 puzzles take a few seconds (one or two) and 16x16
takes five to ten seconds.
These times do vary with the interpreter being used.
Compatibilty issues
- The java program runs as intended under the j2sdk version 1.4
for both Windows XP and Mandrake Community 10.1.
It also runs under kaffe in the latter.
It also runs as intended uder Knoppix 3.7 (but there seems to be
no java compiler)
- Other systems may have problems with the Save As dialog
(In Fedora Core 4, as I have installed it, the java interpreter
brings up a save dialog with no way to enter a new filename.
This can be gotten around by using SudokuUI2 in place of SudokuUI
Since the j2sdk documentation describes the FileDialog class
as being a SaveAs box, it seems this is a problem with the
java interpreter I am trying rather unsuccessfully to use in
Fedora Core 4.
- Another problem is that on some systems (Fedora 4 and Suse 9.3 Live)
the progress bar isn't updated during progress. Since generating
25x25 puzzles can take some minutes, the program may appear to hang,
but probably hasn't.
- Yet another problem with Fedora 4 is that the dialog boxes that
display the progress bar, difficulty and validity results don't fully display.
They need to be resized to show the full message and the okay
button which closes them. (Resizing the progrss bar is pointless.)
In general, even if I can get it to run under Fedora 4 as I have installed it,
it runs very slowly and echoes many error messages to the console.