Java on OS X

Heh - the thing that’s currently annoying me is how both Mozilla and FireBird/Fox will lock completely when you visit a page with a Java applet on it. The browser freezes while the JVM starts, so several times a day I think “It’s crashed!” followed five seconds later by “Oh, no, it’s just Java starting.” It’s not giving me a very good impression of Java, so god only knows what most users think.

My FireBird runs with the Click-to-play Flash movie extension, which is a godsend. Now I want Click-to-play applet support!

FYI: Java 1.4.2 Update 1 Developer Preview is available for OS X 10.3.1 and above from the Apple Developer Connection.
Apple looks to be doing a much better job of keeping up with Sun since they did the initial 1.4 port. Cool.

[quote]How fast is Java on OS X? Taking a look at the Scimark benchmarks results, I see Apple’s VM consistently giving results below the 100 mark, yet other VMs like Sun and IBM give very high results.

Now I know that Scimark is a microbenchmark of sorts and the usual caveats apply, but the results are still surprising.

Is there a problem with the Apple VM, or is it something to do with the PPC architecture?
[/quote]
A bit late now to reply (maybe) but I think you will find the PPC architecture is better suited (more registers for example).

The problem you are seeing is probably the lack of a server VM for MacOSX. That puts it about 3x slower than it could have been. It annoys the hell out of me, all I can suggest is you lobby Apple about it (the guys at Sun/Java gaming group don’t seem overly bothered, but then it’s not their platform underneath). It’s a crying shame, as I suspect (with proper instruction scheduling) a G5 based server VM might be one of the fastest Java based number crunching platforms out there!

Andy.

EDIT : When I get my own G5 (soon) instead of borrowing one, I will have to try some C# or J# using mono to see what the Mac platform can really do. That’ll put the cat amoung the pigeons around these parts (yes I’m trolling) :wink:

I tried dotGnu on my macosx machine and it was a great deal slower than the Java VM.

[quote]I tried dotGnu on my macosx machine and it was a great deal slower than the Java VM.
[/quote]
That would be because dotGNU is interpreted (eventually), whereas Java eventually compiles to native code, as does mono.

[quote]Heh - the thing that’s currently annoying me is how both Mozilla and FireBird/Fox will lock completely when you visit a page with a Java applet on it. The browser freezes while the JVM starts, so several times a day I think “It’s crashed!” followed five seconds later by “Oh, no, it’s just Java starting.” It’s not giving me a very good impression of Java, so god only knows what most users think.

My FireBird runs with the Click-to-play Flash movie extension, which is a godsend. Now I want Click-to-play applet support!
[/quote]
That seems to be an inherent problem with Mozilla/Firebird’s plug-ins. I get the same problem with Adobe Acrobat files, MS Word files, etc. And this is on an Athlon 64 with gigs of RAM so the machine ain’t the issue.

I’ve tried mono on Linux a few weeks back. Running Scimark on Mono is a joke. It provides performance about equal to the client VM(1.4.2_04) on my machine. Needless to say, the server VM mopped the floor with it.

And yes, I did enable the JIT, and passed all sorts of other optimization parameters. Not much diff.

In case anyone didn’t notice Java 1.4.2 Update 1 Developer Preview 2 is now available for Mac OS X 10.3.3 and above.

and just as an additional note: when downloading the OS X Developer Java Updates - select to download from the US based servers rather than the European as they are ten times as fast.

That’s actually quite impressive. So on the Mac, mono is as fast as java. This illustrates the need of a server VM on the Mac. Or better yet, a merged VM everywhere.

has anyone ever tried freebsd here? Its threading model from a users point of view is brilliant. It never freesez, the GUI never stops responding, even when a CD is being burnt and a tape drive backup is in operation simulateously.

Albeit Java 1.2 is only supported by SUN, but there is a port for java 1.4_04. Besides, you have a linux emulation layer on there too, so you can emulate things that linux can run, at a comparable speed too ( if not faster e.g. Quake III)

So whoever is using a Unix or Linux, switch to freebsd now :wink:

The real question is binary compatibility. Whenever someone talks about the ability to emulate, many of us smile wisely and think “never again” having born the pain of discovering just what it means for an emulator to be 99% accurate instead of 99.9% or 100% (hint: it can potentially mean that no programs work at all!).

If xxxBSD can simply execute all linux apps - with some kind of simple proviso such as “which use glibc v.xxx or later” - without emulation shenanigans, then it’s a good proposition. But where it can’t, then you’re talking about going into the no-man’s land of proprietary OS’s that your critical applications may or may not be available for. (Anyone else here used BeOS?)

Sigh. BeOS. If only Sun had bought them.

Cas :slight_smile:

bah - they’d probably ruin it too…
My bet is still on OpenBeOS, aka Haiku-OS (http://haiku-os.org) - still making huge progress, though it will still take some time…