Java is crap in OS X. Some things are 5-10 times native slower than in Classic

CaptainFoo

Registered
I mainly bought OS X because as a Java developer it would be much nicer being able to use the command line for compiling and running Java programs rather than using the quirky interface in 9.1. And I guess the Java was supposed to be really good.

Unfortunately Java applets hardly run, some applets are 5-10 times slower in X than in 9.1. Check out http://www.multris.com/ for instance. The support for Java 1.3 does not exactly work well either. I tried to install Forte (Suns free IDE for Java programming). Not only does it generate a number of exceptions at start up time, but also the program is hardly runnable, often you have to click a control twice to make sure the window gets focus first, and many icons and symbols does not show up correctly.

Is anyone have luck with Java in OS X? Any news on when we will get a working version?
 
I used OS X (PB) to do my java stuff last semester in my Data Structures class and everything ran well. I did not try to run Forte on it though. Java in OS X seemed OK to me, ofcourse the only things I asked it to do were text/CLI based no graphics.
 
It runs Forte about 5 times as fast as the wintell boxes on my college's campus.
 
First, Strobe, if Java always ran like crap then it wouldn't be powering so many web sites and enterprise business logic processes. But yes, Java's no C++.

Then again, Java's no C++: <em>Thank goodness</em>.

I installed Forte CE 2 from the .class distribution without a hitch. It runs fine in OS X despite the fact that I have to launch it from Terminal with a shell script.

Too bad "click through" doesn't happen: If I'm in one Forte window and want to select a menu or button from another, I have to first click on that window and then click on what I want.

BTW you can modify your runide.sh file to put the menu bar in the Mac menu bar, but it only shows up when the Forte menu bar window is active. Does anyone know of a way around this?

Modify runide.sh:

change line<br />
<tt>jreflags="-Xss1024k -Xms20m"</tt><br />
to<br />
<tt>jreflags="-Xss1024k -Xms20m -Dcom.apple.macos.useScreenMenuBar=true"</tt>

-Rob

 
Please please please do not use the 'mac' L&F unless you are conforming to the Aqua HI Guidelines. Confusing enough with Carbon and Cocoa without Java apps muddying the waters with their weird interfaces.

Also comparing Java to C++, what is C++ and why the heck should I compare anything to it?

C++ is total crap, so what if Java is better? It's like saying Bush is better than Gore, they both suck!
 
rharder,

How did you figure out how to set that system property? Is it not possible to set clicks to click through?

Now my Forte installation does not start up at all... just quits after loading, perhaps I should install it again :(, and then I might work for another day or two.
 
Many people have made this mistake - the Java support in MacOS X is NOT the same as Java support in IE 5 for MacOS X. Microsoft uses their own Java VM for Internet Explorer - not the 1.3 VM that ships with OS X.

Now, if only there was a way to specify WHICH VM IE should use ...

Java plugin for MacOS X anyone?

I have not tried Forte - in fact I have not tried ANYTHING Swing- or AWT- based so don't flame me, but in my experience everything else that I have tried - heavy server stuff - just screams and is rock solid. As good as or better than Java on Solaris and MUCH better than Java on Linux
 
Haven't tried it in Java, but in my opinion, this behavior is very consistent with the Mac/Aqua interface, where unlike X-Windows or MS Windows, the parent window has to have focus before any control registers a click
 
Vihung,

Actually Explorer uses the native Java, but somehow it feels like the link between Java and the browser could be a lot better...

The actual Java core processing power seems to be very good, but some methods in the Java API is *really* slow. For instance creating images from byte arrays with MemoryImageSource takes forever. About 10 times slower than in Classic! Hope they fix it soon...

By the way, I have played around with Cocoa a bit the last days, does anyone know if it is actually compiled to native code or to bytecode (if one program in Java that is)?
 
vihung, is that no-click-thru thing an expected behavior (not a bug)? I do seem to recall something about that in Apple's Aqua Human Interface guidelines, but now that I see it in action...it's kind of annoying. It's annoying when working with the Finder too.

-Rob
 
Some interesting notes about Java's performance can be found in <a href="http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#GraphicsAndJava2D">this Apple release note</a>.

They state that the Java 2D code actually goes straight to Quartz, resulting in "<cite>up to 5x the performance of Sun's implementation</cite>" for complex graphics. It's interesting also to learn that some things, like diagonal lines, are rather slow because "<cite>it has not been optimized for some basic shapes</cite>."

-Rob
 
<p>One thing I've noticed with IE on WinDozes is that the JIT (Just-In-Time compiler) when used with the browser was really slowing pages down on our intranet when I used Exploder instead of Nutscrape.
<p>If your classes are only being used once, or even two or three times, you may be paying more for the JIT compilation than you are for just running bytecode.
<p>I'm on my peecee here at work so I don't have the OSX Internet Exploder up and running, but the JIT enabling option should be found under the 'Advanced' preferences for Exploder.
 
FYI command-click ought to click-through. At least it does this with Cocoa apps, with Carbon apps it only works with title bars which is rather annoying (why only title bars?)
 
Thanks for the Command-Click through tip. I just tried it with Forte: no luck. Bummer.

-Rob
 
Please have a look at the thread "Java (swing) and zoom (green) button" in the "programming porting/Cocoa" section, and contribute your comments if possible. Thanks.
 
Originally posted by vihung
Many people have made this mistake - the Java support in MacOS X is NOT the same as Java support in IE 5 for MacOS X. Microsoft uses their own Java VM for Internet Explorer - not the 1.3 VM that ships with OS X.

Now, if only there was a way to specify WHICH VM IE should use ...

Doesn't IE5 use Apple's MRJ? I do know that older versions of IE (pre version 4?) used MS's own implementation of the JVM. In version 4, if I'm correct, IE allowed you to choose which JVM to use.

I have not tried Forte - in fact I have not tried ANYTHING Swing- or AWT- based so don't flame me, but in my experience everything else that I have tried - heavy server stuff - just screams and is rock solid. As good as or better than Java on Solaris and MUCH better than Java on Linux

I've not tried Java on Mac OS X yet but I find Java on Linux kidna ok. I use IBM's implementation of the JDK and JRE instead of Sun's, though. :)
 
Back
Top