Using gcj as an extension language

Dhek Bhun Kho bhun@chello.nl
Thu Dec 19 11:38:00 GMT 2002


Hello Erik,

This is not meant to flame, just my 2 cents.

Op do 19-12-2002, om 19:47 schreef Erik Poupaert:
> To-Swing-in-slow-motion isn't an option either.
Swing in slow motion is often not caused by Swing. Sure it is a little
bit slower, but if you  program swing the wrong way (AWT style) it slows
down even more. Look at JEdit for example it's clean and fast. You tell
me: what other choice did Sun have a few years ago? The had to keep the
GUI libs platform independent and produce something fast. It wasn't
possible to just type 1 line of code to get a combobox. (Which is
possible in AWT). It's easy to get something working in Swing, but it's
not easy programming it correctly so you work within the Swing model. 
You are probably aiming at Netbeans or S1S (which can be horribly slow
on win32, but runs quite fast using linux). And yes Eclipse is an
alternative. So is JBuilder, JDeveloper, JEdit, emacs, vi.. I just
wished they aimed more on user space things. OpenOffice is a great thing
(probably and especially for the corporate guys).

> whatever, and implement a frightening array of duplicate technologies,
> including the latest hypes, in the core of its class libraries. (AWT,
> Swing), (RMI, CORBA, SOAP, ...); and that my executables will get 
They have to follow the hype. They are _commercial_ they must offer an
alternative. The current aim as I see it from Sun's perspective is to
offer a good alternative (capability wise) to all other existing
techlogies. A lot of it is still optional (java mail etc.). One of the
bigger goals was to attract a large body of VB developers who aren't
supposed to be as technical as C programmers. (I'm somewhere in
between). And yes the libraries are huge. And it's being used heavily in
academic fields to get acquainted with O-O.  RMI/CORBA are important
because they are the basis of J2EE. Soap is important because MS is
hyping it up (Don Box). It's just another silly markup language which
some pros and cons. <execute>this</execute>
<execute:reply>failure</execute:failure>.  I wonder how long it's going
to take before POP get's XMLed

> bigger and bigger, just like the JRE has now inflated to a staggering
30 Mb.
That's not the JRE you're talking about, don't forget that they can
always use webstart or whatever. That's the jdk. And have you looked at
the size of the shared libraries when compiled using gcj??? Just too get
ant working takes me 20 MB of shared library code. That doesn't beat the
bytecode. Too me it's not of an issue, because what I am working on is
aimed at a desktop, and isn't meant for commercial purposes (like
embedded linux). It'll take ages too finish anyway.

> The Sun JDK has now truly graduated into a fully-fledged monster nest.
> It's simply anti-technology.
Not it's not. You have a choice. You choose. And you pay for the choice
you made. 

The only reason I have a bit of a antipathy against the new upcoming
version is that they are seen to be so keen on keep adding new
libraries, whilst one of the highest scores for bugs and rfe's in the
bug parade is for making the memory footprint of the jvm smaller (by
default it loads huge amounts of classes). 

Yes you can solve a lot by tweaking the ClassLoaders and but I don't
want to spend time on that kind of issues.

Well fine. But it think it's just plain lazy not to write a wrapper
class and let a preprocessor do the work (or however you implement
this). 

They made some great changes into the new 1.4 version, but alas they
released it a bit soon I guess. So a lot of people got problems with 3d
cards (because of the VolatileImage class which relies on d3d). They
made new interfaces with nio and have multimapped io now, that's a great
improvement. altough I couldn't figure out why the nio is supposed to be
non-blocking. Maybe because the older api's require more work to get it
non-blocking.

> with GCJ what I would otherwise have to do with C++, including GUIs.
If you can program C++ well, why are you digging into Java? 

The only reason I program java is that I don't have to delve too much
into syntax and most java programmers are quite rigid about keeping code
clean and readable for everyone else to read. That´s what I like about
Sun Java(Tm) besides the fact that at the moment it seems to be the only
reasonable alternative (and no too forget IBM's java implementation). If
Sun didn't take up the gauntlet a few years ago, you wouldn't have a
choice. 

Don't get me wrong, I am not pro-Sun, pro-IBM, pro-MS, or anti-
whatever. I just want to have access to sources and be able to modify
programs or learn how others did something. I want to have a reasonable
choice in life, even if it's just something like choosing your
development environment.

I wanted to use gcj, because I can learn more of java at a lower level
and have easier access to the existing libraries on the linux platform.
Besides the important fact that it's gpl (or am I wrong) so If my little
project succeeds I just distribute it. This will make it easier for me
for my planning to get into c/c++ coding and learn stl and interface
java to gtk2 (if I ever get to that). I just really like
linux/x/gnome(2) as a desktop environment, but it's very hard to switch
from pure java to a intermingled environment where you code in c, c++,
and java all at once or have to know how it works anyway. And don't give
me that story about java-gtk, because it's nowhere near functional. And
yes, we could all use swt. But as long as the apps don't slow down _too_
much I really don't care. It's just fun to be able to load skinlf and
skin all the swing apps, and muck up the themes. 

So I found out that something that's supposed to be simple like a
StringTokenizer doesn't even function correctly (this is not meant as
criticism, it's an observation). There is some bug somewhere in
serialization (another fundamental thing). Somehow if you exec a
commandline argument the whitespaces get deleted (probably due to the
stringtokenizer). My first thought is: so what? I can code it. It just
takes time. There are more guys out there who would be willing to help
out writing some java code or cni intefaced c++ (as long as you give
them credit for it). I am just glad there are some people on this list
who can code a jvm. I know I can't write compilers, that's too low-level
for me at the moment. But hey it's GNU, so no warranties. I know.

I don't really care whether you use xml, css, cni, jni, jstl, taglibs,
struts, jsp, jndi, corba, .net, com+, com, sax, dom, scheme or whatever,
as long as it doesn't prevent me from porting my source code easily and
the compiler and runtime environment works reliably (meaning that
failure is due to my own code and not the underlying compiler, linker or
whatever).

This is getting too political.. Only the sun is free (and gnu).

Greets Bhun.



More information about the Java mailing list