[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

Why Maggie Likes Java [was:Re: Java/blecchh]

Douglas Cole wrote:

> I hate to admit it , but I have to agree with Jon , I have had only poor
> experiences with web pages written in Java ( ie: locks up netscape ,
> crashes netscape , locks up windoze IE at work , crashes windoze IE at
> work , weird drawing of screen items/text ) , so I am very interested in
> what is so wrong with Java that the results are always so inconsistent ?
> I love the idea of platform/OS independence , but for now I always leave
> Java turned off on my browser :^P
> What say Mag's , I trust your input , so enlighten me ....

Valid criticisims. Let me explain why I'm very optimistic about the 
future of Java technology, even though every one of the symptoms you 
decribe are screw-ups I've seen all too frequently with the early 
browser implementations of Java.

Netscape's Java Virtual Machines (JVMs are the interpreters that run 
compiled Java byte-code programs) have been particularly yukky.

Netscape and Sun formed an alliance of necessity around the time Bill 
Gates decided the Internet and web browsers weren't going away (December 
1995), and Netscape agreed to build a JVM into their browser...a task 
was probably beyond Netscape's ability to do well for free.

These days, with Netscape 6, and Mozilla (the open-source browser that 
forms the code base of Netscape 6 and above, which I run as my main 
browser now), the Java-running job has been handed back to code in a 
plug-in from Sun.

They really do a much better and more stable job of it (although t'was 
not ever thus!) IBM has been doing some really impressive things with 
Java run-times and compilers too, so in some situations you have a 
choice as to which you like better. Kind of like not single-soourceing 
an electronic component--but still being able to rely on Javasoft (Sun) 
to keep things standardized and interoperable.

Java Virtual Machine technology is now *vastly* better than it was in 
the Bad Old Days, and getting better all the time. A whole scrutload of 
bugs in other parts of the technology have been identified and corrected 

As for IE...well, I wouldn't expect IE to run Java well. MS doesn't 
really *want* Java to work. And MS has lost their Java licence by 
violating the agreement they signed with Sun to get it, so that's a dead 
issue. When that licencing was first announced years ago we thought it 
was too good to be true. It was.

The graphical inconsistancies you have seen in the past may be a result 
of several things. But most likely they are because the most recent 
generation of Java-- Java 2, learned a whole lot of lessons in the early 
days about how to draw graphics and text with resaonable visual fidelity 
across a wide variety of platforms.

In Java 1, we tried to work with whatever text and graphic 
primitives--fonts, especially,, but other GUI "widgets" too--were 
available "natively" on the target platform. This is an incredibly 
difficult job--so difficult that Java 2 has more or less given up on that.

The old tools (or safer compatible replacements) are still there, but 
the new GUI facilities (sometimes called "Swing" or other parts are 
called "Java2D") are *vastly* better performing and better at preserving 
visual fidelity across platforms, because instead of trying to build an 
SAE car from the metric parts available locally, they do the lion's 
share of the work from scratch, to ensure it works the same way  everywhere.

This has worked so well that you can use a facility called "PLAF" or 
"programmable look and feel" to have windows for Java programs look like 
they're using Windows parts....or Mac parts....or Motif parts...or a 
look-and-feel that is unique to Java, all without changing the 
underlying application at all, and all on any platform that supports Java.

This has involved some restructuring of how Java programmers make GUI 
things happen on the screen: if you want the benefits of the new stuff, 
you have to learn some new ways. Having been exposed to both I can tell 
ya the new stuff is much better. If you're not a programmer, you don't 
care....except when old code looks like crap on your screen. :-)

And meanwhile, while the GUI elves were making things pretty, the JVM 
brownies were making things *faster*. *Much* faster. So much so that 
we're sneaking up on performance that gives good hand-written C code a 
serious run for it's money, and runs *better* than badly written C code,
*Without* the pointer and memory management pitfalls that cause 
less-than-meticulously written C and C++ programs to leak memory, try to 
access parts of memory that don't belong to them, lock up the 
application or crash your machine. Things that many programs written in 
C/C++ (like Netscape and IE, ferinstance) are famous for.

Writing in C/C++ without screwing up fatally once in a while is 
incredibly diffficult. Java is much safer and easier for a programmer to 
use, IMHO. Is it possible to write slow or buggy Java code? You betcha. 
Is it easier to write clean, stable, functional and *portable* programs 
in Java than it is in C/C++? My own opinon is that it is.

Unfortunately, if you're on Netscape V4 or IE with only the MS "Java" 
facilities, you don't have the graphic goodness of V2, *or* the vastly 
improved performance of the new JVM technologies, because your browser 
has an old JVM. The only way to fix that is to get the new Java --from 
Javasoft is one good place-and install it as a plug-in in your browser. 
Or get a new browser with current Java tech in it, probably as a plug-in 
from Sun.

That's the bad news.

The *good* news is, if you want to run Java *programs* (as opposed to 
just web pages that have Java applets in them) there's absolutely no 
reason why you have to run Java in your old browser at all.

You can run Java programs on your Windows or Linux or Solaris or AIX or 
AS/400 or even a Palm Pilot without a browser anywhere in sight.You just 
use a "JRE" or Java Run-Time Environemnt to run Java programs on their 
own, just like you would run a Visual Basic program with those VBxxx.DLL 
libraries (the Visual Basic runtime) or a C++-develpped application with 
MSVCRTxx.DLLs (The MS Visual C++ runtime) hiding out in your 
\WINDOWS\SYSTEM32 directory. Most modern languages need a set of 
standard subroutine libraries to be available to their programs...all 
you really need is a modern Java runtime and you're good to go.
It's late Friday night...and I is s'eepy, and I have a week-long 
business trip to Raliegh staring me in the face. But you got me started, 
Doug...obviously flattery will get you everywhere with this girl.

73 de Maggie K3XS

-----/___.   _)   Margaret Stephanie Leber    / "The art of progress  /
----/(, /|  /| http://voicenet.com/~maggie   / consists of preserving/
---/   / | / |  _   _   _    `  _AOPA 925383/ order amid change and /
--/ ) /  |/  |_(_(_(_/_(_/__(__(/_  FN20hd / change amid order."   /
-/ (_/   '  K3XS  .-/ .-/    ARRL 39280   /___ --A.N.Whitehead ___/
/____ICQ 7161096_(_/_(_/__AMSAT 32844____/ <maggie@voicenet.com>

Via the amsat-bb mailing list at AMSAT.ORG courtesy of AMSAT-NA.
To unsubscribe, send "unsubscribe amsat-bb" to Majordomo@amsat.org