News for hackers. Stuff that matters.
Re:Apple deprecates Java by msy on Thursday October 21, 2010 @04:22AM (#1814709)
I wonder if putting the boot into the most straightforward cross-platform solution for desktop apps has anything to do with the proliferation of OSX Java apps with shoddy/un-maclike UX/UI or whether it's something to do with Oracle's recent moves.
Re:Apple deprecates Java by thought_alarm on Thursday October 21, 2010 @05:17AM (#1814788)
I think it just means that Apple has no interest in bringing Java 7 to OS X. It certainly took them a long time to release Java 6.

Funny thing is, one of my favorite Mac apps was/is written in Java: Cyberduck FTP client.

Cyberduck is an open source app originally written using the Java/Cocoa bridge, then using some hybrid of Cocoa and Java. But the thing is, the end user has absolutely no idea that it's a Java application. The only reason I know it's written in Java is because I looked at their source code to see how they implemented Quick Look (before it was a public API), and boom, the damn thing's in Java! As a longtime hater of Java desktop apps, I was flabbergasted.

As far as I'm concerned, OS X was the only desktop platform where Java had any sort of chance for user acceptance, but it never caught on with developers. As such, Java has been effectively dead as an option for desktop development since OS X Leopard.

Re:Apple deprecates Java by meelash on Thursday October 21, 2010 @07:17AM (#1814986)
Really, that's very surprising. I'm a longtime Cyberduck user and had no idea...
Re:Apple deprecates Java by micheljansen on Thursday October 21, 2010 @09:45AM (#1815321)
I am both surprised and delighted.
Re:Apple deprecates Java by riffraff on Thursday October 21, 2010 @04:42AM (#1814744)
is there such a proliferation? the only java app I use on the mac is cyberduck, and it is neither shoddy nor un-maclike
Re:Apple deprecates Java by hboon on Thursday October 21, 2010 @04:46AM (#1814750)
Had no idea Cyberduck is written in Java. If only all Java desktop applications are like this.
Re:Apple deprecates Java by albertzeyer on Thursday October 21, 2010 @05:23AM (#1814797)
Oh, me neither! I really had to check this out.

The main point seems to be: They don't use any of the Java GUI frameworks. They instead use some Cocoa bindings.

See here: http://trac.cyberduck.ch/browser/trunk/source/ch/cyberduck/u...

Re:Apple deprecates Java by rimantas on Thursday October 21, 2010 @05:58AM (#1814849)
I use SmartSVN, wouldn't call it ugly.
Re:Apple deprecates Java by albertzeyer on Thursday October 21, 2010 @07:00AM (#1814952)
But this seems to be AWT. And the GUI just doesn't feel as snappy as native Cocoa.

Actually, I wonder why that is. I always thought that it is Java itself which makes Java applications feel slow. But I haven't noticed this in Cyberduck. So maybe it is just AWT.

I wonder why that might be. Maybe because AWT does all the drawing itself, which is much slower compared to the native toolkit?

Re:Apple deprecates Java by riffraff on Thursday October 21, 2010 @08:39AM (#1815150)
many SWT apps, using native look and feel, still feel slowish (think azureus/vuze if not eclipse). Some AWT apps are perfectly snappy e.g. jedit opens a file faster than macvim on my box.

My belief is that apart form some overhead in AWT against native toolkit, 90% of the laggish experience in java apps is due to poor coding.

In turn, this is probably a byproduct of the java platform/language (abuse threads cause they are easier than an event loop, abuse locking cause synchronized is more obvious than util.concurrent, avoid thinking of memory management cause you have a GC, do not pay attention to proper data structures cause you can get away with builtin collections etc)

Re:Apple deprecates Java by stcredzero on Thursday October 21, 2010 @08:59AM (#1815184)
do not pay attention to proper data structures cause you can get away with builtin collections etc

Specific examples from your experience?

Re:Apple deprecates Java by riffraff on Thursday October 21, 2010 @10:54AM (#1815649)
code I wrote myself :)

First one I think of (cause I redid it today, in ruby :) is:

you need to keep a list of lines you already processed in a large log analysis. I'd just use a Set (which is a hash underneath) and get done, although I'd have saved a bunch of overhead (memory allocations, gc pressure) using a bloom filter.

Re:Apple deprecates Java by stcredzero on Thursday October 21, 2010 @12:30PM (#1816168)
Examples where the "extra overhead" caused an actual problem?
Re:Apple deprecates Java by riffraff on Thursday October 21, 2010 @05:26PM (#1817506)
A a few more gigabytes of memory allocated, consequent swapping and slow processing
Re:Apple deprecates Java by riffraff on Thursday October 21, 2010 @12:44PM (#1816275)
the one I just wrote you about
Re:Apple deprecates Java by stcredzero on Thursday October 21, 2010 @12:48PM (#1816297)
What problem did that specific bit of GC pressure cause you? (I'm doing "5 whys" in reverse. Otherwise known as "The Socratic Method.")
Re:Apple deprecates Java by riffraff on Friday October 22, 2010 @04:55AM (#1819024)
sorry I thought I replied yesterday but apparently my comment got lost.

Using a (hash)set instead of a bloom filter caused memory usage to explode, which in turn led to memory thrashing/swapping which in turn led to slow processing times.

The rest of the code runs in constant time (well, linear in the size of the item, with num(items) >> size(items[n]) ) and it did work fine for smaller inputs.

Re:Apple deprecates Java by stcredzero on Friday October 22, 2010 @06:32AM (#1819167)
How much slower? Just how much wall clock time did you lose?
Re:Apple deprecates Java by riffraff on Friday October 22, 2010 @06:49AM (#1819198)
hard to estimate I'm sorry. The first naive implementation had been running for more than 15 minutes before I thought it as too much and killed it. Rewrote version run all in about 5.
Re:Apple deprecates Java by rryyan on Thursday October 21, 2010 @10:57AM (#1815666)
Jobs and Ellison are buddies -- I would find it surprising if Oracle went after Apple over some Java legal issue. My bet is on shoddy UI, plus the time invested vs. payoff balance.
Re:Apple deprecates Java by WaltFrench on Thursday October 21, 2010 @09:54PM (#1818282)
I have found this thread blissfully flamewar free regards business motivations. That said, I think this first mention of business issues is both overdue and needing expansion.

How can one look at the deprecation of a particular runtime in isolation from (a) Apple's simultaneous announcement of increasing commonality of iOS and OSX, and (b) Oracle's aggressive enforcement of comm-related java libraries?

Since Apple sells and approves all app-store products, they bear plausible liability for an iOS app, if Oracle was lawsuit-minded. I would hardly be surprised to learn that Oracle will NOT sue Apple over runtimes that could trip up Google, thanks to Apple's agreement to remove possibly-offending code.

Or, alternatively, if you have an iOS app that wants to do comm in java, how could Apple field an alternative library to one that Oracle claims is theirs?

This makes Apple-supplied java runtimes a dead end. We'll see how interested Oracle is in licensing alternatives.

Re:Apple deprecates Java by pvaibhav on Thursday October 21, 2010 @10:30PM (#1818362)
> I would hardly be surprised to learn that Oracle will NOT sue Apple over runtimes that could trip up Google

I think the difference is that Apple licenses/d Java and bundles a standard VM and framework, while Google did not do so - they just used the language with their own VM and framework distinctly different from, say, J2ME.

Re:Apple deprecates Java by BenSS on Thursday October 21, 2010 @09:58PM (#1818290)
I think it's more that now Ellison owns Java/Sun, he wants control. Jobs was happy to hand over the resource-suck since he sees the future as iOS apps and appstore anyway.
Re:Apple deprecates Java by yakisoft on Thursday October 21, 2010 @04:28AM (#1814724)
I don't think Oracle is even on Apples radar, Apple is largely a consumer/creator focussed business, Oracle is purely B2B.
Re:Apple deprecates Java by riffraff on Thursday October 21, 2010 @04:41AM (#1814742)
yet, some java developers are mac users, losing them does not seem smart
Re:Apple deprecates Java by micheljansen on Thursday October 21, 2010 @09:49AM (#1815333)
It seems like more than a coincidence to me that this announcement is made right after Oracle absorbed Sun and made some pretty shocking announcements about their plans with Sun's open source portfolio (OpenSolaris, MySQL) and Java.