Folks, I hope this is not stupid question for this mailing list.
A year ago I wrote, purely for amusement and self teaching after I
retired, a program in Java which was intended to be cross-platform, and
accessible both as a straight jar archive, and also as an applet in a
web-page. In addition, it can be run without any graphical interface
(controlled by a command line switch), so it can be used to generate
things offline in a script. I surprised myself and got it working
precisely as I expected. (It remains the only java program I've
written.)
I was using Sun Java JDK 1.4 initially, but the system I was using has
had its Linux (Suse) upgraded and it now has Sun's 1.5, but the builds
still worked and the results are fine. There is only simple use of
swing as I was learning as I went.
I've put Kubuntu on a laptop, and before messing around with Sun's
Java, I thought I'd give gcj a try as it comes with the installation.
However, I've immediately hit serious problems.
1. I first tried using gij on the existing (Sun generated) jar files. It
starts, but the initial display is wrong (two of the text panes contain
only the first line of text, and not the rest). It responds very slowly
- we're talking an order of magnitude or more slower than Sun's java.
And the display does not always get updated after an action, but only
after something else triggers a rewrite, but I can't figure out what
triggers it. There are other problems with the text pane, too as it
seems to produce multiple copies of the text put into it. But on the
whole it seems to work, although it is not usable in practice.
2. When I added the no-display parameter to the invocation the output
came out rapidly and correctly, so it looks like it is swing that is
far too slow. I also noticed that it threw up the following at the
beginning, even though it should not have even tried to display
anything at all.
[quote]
X Error: BadDevice, invalid or uninitialized input device 166
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 166
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
[/quote]
3. I then tried to run the make using gcj and fastjar. It compiled
and created the jar archives without any failures being reported, but an
attempt to run the resulting file got this:
[quote]
andrew@laptop:~/Dev/Products/Sokuku/1.0-3$ gij -jar Sokuku-en-1.0-3.jar
Failed to load Main-Class manifest attribute from Sokuku-en-1.0-3.jar
[/quote]