Java 6 Available on OSX Thanks to Port of OpenJDK 202
LarsWestergren writes "Many Mac users have been upset that Apple has not made Java 6 available on the platform. Landon Fuller posts that there is a developer preview release available of Java JDK6 on Mac OSX, Tiger and Leopard. It is based on the BSD port of Sun's Java 6 and is made available under the Java Research License. Charles Nutter posts about impressive JRuby performance gains using Java 6 on his Mac."
Maybe it's me (Score:5, Funny)
I'd have thought not having Java infecting your machine would be a huge advantage myself. Not having
Re: (Score:2, Insightful)
Re:Maybe it's me (Score:5, Informative)
Re: (Score:2)
Re: (Score:2)
That being said..
Java used their own in-built controls so the language could be portable, cross-platform, etc.
Well.. why couldn't they keep that in place, but also write special-case code for the most popular platforms? Like, and excuse how crude this is:
switch (current_os)
{
case XP:
Re: (Score:2)
Yes, it is ass-backwards. This is Sun we're talking about, so it is difficult to be surprised.
Re: (Score:3, Informative)
Re:Maybe it's me (Score:5, Informative)
Re: (Score:3, Informative)
Re: (Score:2)
Re:Maybe it's me (Score:5, Interesting)
No PHP crap. Slow, and it is only for script kiddies.
No Ruby crap. Way too new and it is a fad.
No games... they just cause systems to crash. Who needs cool games.
No C or C++, only that crappy C variant that Apple makes.
Heck, now that I think about it, no programming languages at all. Make it just like they wanted to with the iPhone.
Obviously I am kidding... I own a Mac and run most (not all) of the stuff mentioned above. I game on a console. I do wish that Apple would release their GUI Java stuff under GPL, so people like this guy could get Java 6 with SWING out there ASAP. I would love to do my Java development on my Mac without using Parallels and XP.
Some have suggested that Sun should be the one making a VM for Apple, and I would agree BUT Apple should have come to Sun two years ago and said that they were out of the JVM business and worked with Sun to insure a modern VM was on their platform. It is in both parties interest to see a good JVM on the Macintosh.... Hopefully one that doesn't require a freaking OS upgrade to get the latest version of Java.
Please Apple, finish Java 6 for the Macintosh and then hand the code over to Sun to make Java 7. Sun take that code and open source it as well.
Re: (Score:3)
Your behind by a few months.
http://open.itworld.com/4915/070508opsjava/page_1.html [itworld.com]
Here is a summery for people to lazy to click on the link from http://en.wikipedia.org/wiki/Java_(programming_language) [wikipedia.org]
Re: (Score:2)
I want Apple to GIVE Sun the code that makes SWING run on the Mac OSX and look good. Sun could then opensource that code as well as the Open JDK project.
The guy that did the JDK 6 for OSX (awesome guy), has used the BSD version and it requires X to run Swing applications. These applications will look bad compared to the near native look and feel of SWING applications run on Apples 1.5 JVM. Apple put a lot of time in to making Java applications look and feel great on their pl
Re: (Score:2)
Re: (Score:3, Informative)
Not Open JDK based (Score:5, Informative)
Re:Not Open JDK based (Score:4, Informative)
The porters group should be created this week, I hope, and then it shouldn't take long to get the BSD port into OpenJDK, and after that Landon's work.
cheers,
dalibor topic
What's the big deal about jruby? (Score:3, Insightful)
Am I the only one who thinks it's weird to run an interpreted language inside of a virtual machine? Would there be any application to it, aside from rewriting overly-verbose Java code in a more concise language?
Re: (Score:3, Interesting)
Re: (Score:2)
De gustibus non est disputandem.
Re: (Score:3, Interesting)
Plus it works in Java 5, so I can use it instead of waiting for Apple
Re:What's the big deal about jruby? (Score:5, Informative)
Re: (Score:2)
And it's not that ruby written in C cant be faster, it's just the current implementation that's not. Remember, the JVM and it's JIT compiler are themselves written in C. It would still be more efficient to do it without the extra overhead of java, assuming your program doesn't add any extra overheads/inefficiencies of it's own.
Re:What's the big deal about jruby? (Score:5, Insightful)
That's not to say this all currently works in practice, though. Sun has been telling everyone for the past five years that the JVMs are so robust and intelligent that you don't need lightweight objects to do fast computation (for things like vector math), that you can just use plain old Java objects and the JVM will figure out how to optimize these, and anybody that's ever actually programmed some physics or graphics in Java knows that those claims are still crap. (Though I'm told this version of Java is much better about this stuff, to be fair)
However, failures in implementation aside, there are very good arguments that suggest that as we go forward, JIT compilers will eventually overtake statically compiled code when it comes to speed. IMO the current Java 6 JVM is a pretty good first step towards this ideal JIT compiler; maybe I'd qualify it as a very early alpha version of The Real Thing. Certainly much more of an improvement than the past few versions. It's unfortunate, however, that Sun continues to pretend that they've already got it all figured out and running smoothly, when there is obviously so much more work to do. It's also quite irksome that they ignore most performance-related RFEs, simply promising that the magical JIT will fix everything in the next version...
Re: (Score:3, Informative)
Java is for business applications where performance is nice, but not critical.
But of course, they will market any performance gains, as that's just icing on the cake.
Re:What's the big deal about jruby? (Score:5, Informative)
* value types - now java can often automatically put objects on the stack and this makes the complexity cost of value types hardly worth the benefits.
* jit-only - C# thought that a jit would always be used because jit is 'faster', so their bytecode is not able to be interpreted effectively. This prevents the very efficient mixed-mode interpret followed by hotspot compile (for instance, Java can optimize the program using another core while it is running interpreted).
* 'real' generics - C# thought real generics would be faster by avoiding casts, but the complexity cost of following generic instance types prevents many optimizations such as method inlining that now save more time than casts (iirc CLR only inlined single methods less than 32 instructions and only if not overridden, vs Java inlining multiple method calls deep)
* embedded native code - C#'s bare-metal native code interface allows for faster access to small bits of native code, but it locks objects in place in memory a lot more making the gc more complicated.
In all these cases C# chose the way it thought was fastest but this made the CLR very complex. Java chose the way that was simplest but fast enough. And the end result is that Java is much faster than C# and a much simpler implementation.
Re: (Score:3, Informative)
As for some of the decisions, they are not just about pure speed. There are more considerations.
Value types: This allows the choice of the best semantic match is. Also, this does help with native interoperability
Re: (Score:3, Informative)
Firstly, I think your conclusion that "Java is much faster than C#" is very difficult to support ... but the overall picture I see is that the performance of C# is in fact quite competitive with Java in terms of runtime performance.
You can't post benchmarks of C#, macro or micro... enough said. Actual performance of CLR has to be hidden from view.
Value types: [...] Also, the complexity cost you note is small, as even Java still has value types. If you have to deal with both, then adding in structs isn't that costly, from a language and runtime view.
You'd think... but in Java the bytecode specifically indicates each value type whereas the CLR does not (since there can be any number of value types). The cost of this to CLR is HUGE because makes it not interpretable and also very difficult to optimize... the CLR has to determine types for all values whereas the JVM has the actual type built right into the code. I can't stress enough h
Re: (Score:3, Informative)
And this is definitely a good thing. However, it is being touted as if it's the solution to the entire heavyweight object problem. It is not - plain and simple, objects are too bloated to use if you need to shuffle around and process large amounts of data. If I want to store a list of half a million vectors and do some geometry with them, in Java the only rea
Re: (Score:2)
1: designers must make a hard choice between mutable and immutable objects. Mutable objects are error prone but immutable ones mean a lot of load on the memory manager.
2: objects that consist of aggregations of objects inc
Re: (Score:2)
This is true... but...
Imagine Sun said "It's not perfect yetm but it's getting better" with every release. Meanwhile, given their standard marketing practices, MS said ".Net works perfectly, outperforms everything, in fact it runs faster than is theoretically possible on all supported hardware* and gives the officer responsible for purch
Re: (Score:3, Informative)
The cost is having to do all of the intelligent JVM-like optimization manually, which means you'll spend years micro-optimizing C code instead of macro-optimizing Java code or moving on to new features or another
Re: (Score:3, Interesting)
Re: (Score:2)
It's still a bigger pain than just writing Java code, though.
Re:What's the big deal about jruby? (Score:5, Informative)
Startup...yeah, it's an issue. But JRuby 1.1 will ship with Nailgun as part of the release, which enables you to run JRuby in a background persistent process and execute command-line scripts with startup times in the hundredths of a second range. Quite acceptable.
Re: (Score:2)
To sum it up, a scripting language
Re: (Score:2)
I am confiscating your Golden Hammer. (Score:2)
Is it weird to have both hammers [wikipedia.org] and screwdrivers? While on the topic, I remind you that virtualization is used throughout modern operating systems, and in ways that are completely transparent to you. A Java runtime environment is just one of many such forms.
Re: (Score:2)
I think this is an example of a good analogy taken too far. For it to apply completely, you would somehow have to implement a screwdriver within a hammer, or perhaps assemble a virtual hammer out of screwdrivers, which is downright farcical.
And thanks, everyone who helped answer that question. It was pretty interesting.
Re:What's the big deal about jruby? (Score:5, Insightful)
More seriously, jruby is faster than cruby, and has nicer syntax than java. You would use it if you wanted to write code in a nice language on platforms where you would otherwise be stuck with java. Virtually anything that processes either plaintext or xml is going to be radically easier to implement in jruby than java, and nearly as fast at runtime.
Re:What's the big deal about jruby? (Score:5, Insightful)
Java allows it as well, but it's much harder to sandbox dynamically uploaded java code than a scriplet.
Re:What's the big deal about jruby? (Score:4, Interesting)
Ruby gives you easy scripting without having to use something like Janino to compile and import classes on the fly. Using Java also provides access to all the Java libraries from Ruby (which can be nice) and fixes some of Ruby's issues (I understand that the ruby interpreter is single threaded, for example). There are some good reasons why one might want to do it.
Re: (Score:2, Insightful)
I've been writing Java code since its early days, but I'd *much* rather write in Ruby. And JRuby brings access to all the Java libraries.
Re: (Score:2)
I can't wait (Score:3, Funny)
People will cry foul on the boards, other people will note that as this isn't an official release, it should have been expected that it'd break the updating.
It'll be fun for the whole family!
Clueless (Score:5, Informative)
Re: (Score:2)
(hint: iPhone)
Re: (Score:2)
Why Apple? (Score:3, Insightful)
Shouldn't they be upset at Sun? Why is Apple getting the flack?
Re:Why Apple? (Score:5, Informative)
Shouldn't they be upset at Sun? Why is Apple getting the flack?
Because Apple told Sun not to work on a jdk for mac os x since apple would produce and maintain it.
Re: (Score:2)
Because Apple provide Java on Mac OS, not Sun. Remember how Microsoft provided the Windows version of Java, before Sun got pissed off with what they were doing with it and demanded it back? Same thing here, only Sun haven't got pissed off yet (hopefully soon!).
Can't be bothered looking for anything to back up what I've just said, but go to http://java.sun.com/ [sun.com] and look for any Mac OS X download. There aren't any.
Re: (Score:2)
Having Java ship with the OS installation does have some benefits, though. Especially for Java developers working on applications for end users.
Re:Why Apple? (Score:5, Informative)
Because Apple have shot themselves in the foot with this one. Apple decided they wanted to make Java themselves and offer it through Software Update and all the other Mac niceties. However, Sun releases Java 6 and us Mac Java developers are still waiting. That's why Apple gets the flack and not Sun.
Re: (Score:2)
That wasn't an entirely bad move on Apple's part - at the time, they were planning on making Java a first class citizen on OS X, with native Cocoa [apple.com] libraries for Java programmers. Unfortunately, that's pretty much all out the window now - Apple's tutorials [apple.com] state that "The Java API for Cocoa is deprecated in Mac OS X version 10.4 and later."
So in other words, Apple definitely did something dumb here, but it's not too hard to see what their motivations were.
Re: (Score:3, Interesting)
So in other words, Apple definitely did something dumb here, but it's not too hard to see what their motivations were.
The deprecation of the Java-Cocoa libraries is linked to Apple's support for Objective-C. At one point Apple was saying that Objective-C would be gradually replaced by C++ at one extreme and Java at the other. However, they seem to have realised that Objective-C and the tarted up OpenStep libraries are nice enough to work with that no one really wants to use C++, and that Java developers
Re:Why Apple? (Score:5, Interesting)
Apple provides their own non-GPL'd Java implementation. Presumably, the core components of this implementation have been licensed from Sun under a non-GPL license that allows Apple to create a platform specific derivative work. I know that Apple distributes J2SE 5.0 with an Apple License that states, "...you may not copy, decompile, reverse engineer, disassemble, modify, or create derivative works of the Apple Software or any part thereof." This protects the proprietary parts of Apple's implementation of Java that link to the rest of their proprietary code. BTW, this situation also means that the GPL Classpath Exception doesn't apply to Apple's Java Implementation.
My feeling is that the Apple/Java vacuum has to do with the fact that Java is now GPL'd. I seem to remember that one of the reasons that Apple chose BSD over Linux for OS X was due to the way GPL'd software is licensed. Think about it... Apple has done A LOT of work to integrate Java into just about every aspect of OS X. Probably, under the GPL, they'd have to cough up a lot of their proprietary integration source code. I think that this is also why there is no official QuickTime Player for Linux. If Apple were to come out and announce that they won't support Java on OS X because of the GPL, it would probably cause much worse press than the present situation (which also sucks, btw).
Since OS X, Apple has been a big supporter of Open Source software - but NOT Free (GPL'd) software. My feeling is that before we see OpenJDK on OS X (or on the iPhone), Apple will have to figure out how their proprietary technologies such as Aqua, QuickTime, etc. will be able to legally integrate with GPL'd Java. Either that, or Apple will cease in-house Java development entirely and give it back to the community - relegating Java it to third party add-on status.
Personally, my fear is that since Apple's Java 6 implementation seemed ready to go - especially for Leopard, Apple pulled their Java 6 implementation because they are unwilling to comply with the terms of the GPL. Keep in mind that Java 5 (Apple's current implementation) is not to be GPL'd. If this is the case, there could be serious implications about the future of Java integration with all of Apple's technologies
Because Java is more integrated with system (Score:2)
But there are good reasons for this - Java on the Mac is more tightly integrated than with other systems. For example if you load multiple Java apps, you are not getting multiple instances of Java libraries loaded...
There is also a Java-Cocoa integration layer, which though deprecated has to be supported and tested.
It's true that Java ports have lagged behind other platforms, but there are some compensations in return. That said it
Re: (Score:2)
Re:Why Apple? (Score:5, Informative)
http://www.kernelthread.com/mac/osx/arch.html
Re:So it's entitlement, then? (Score:4, Informative)
Apparently, you're not in possession of all the facts. Apple has provided a beta of Java 6 that is now more than a year old. They dropped heavy hints that Leopard would include a release version of Java 6. Despite these promises, Apple has until now not delivered. Is this reason to be angry with Apple? That's a bit strong, but I am disappointed, and I'm certainly not the only one. If Apple don't intend to release a new version after all, it would be nice if they would just say so. If they did, Sun just might jump in and release their own version, who knows.
Obviously, I am happy that some people were enterprising enough not to wait for Apple, and release their own version. Unfortunately, they can't take advantage of all the work Apple has put in their Java release to integrate it better in Mac OS X. And again a little help from Apple would be welcome: if Apple doesn't want to release new versions on their own, it would help if they would at least open up some of their code to help these kinds of third-party implementations.
Re: (Score:2)
In the case of J2SE 5 the extra 3 weeks time between final seed of 10.4 and shipping of 10.4 (DVD stamp and packaging time) allowed them to correct most of the issues with J2SE 5 so that they made J2SE 5 available as a download on the same day the OS was released. Of course I would argue that they shoul
Re: (Score:2)
Apple have recently released a new version of their OS (leopard), and some new devices (Iphone, ipod) that needed their own port of the OS... And they're still ironing out bugs in those flagship products. Seeing as they only have limited developer resources, it's not surprising to see java on the back burner for a bit.
Who needs Java 6? (Score:2)
Okay, developers need it, but why not develop on Linux, which has had Java 6 for some time now?
"Write once, test everywhere"
Re: (Score:3, Informative)
Who are these "many" Mac users? (Score:2, Insightful)
Re: (Score:2)
Re: (Score:2)
Java whiners (Score:5, Insightful)
(Note: I am a Java developer by day.)
There was a huge, huge stink in the Java community when Leopard was released without Java6. Teeth were gnashed, complaints were shouted from the rooftops, great offense was taken. Threads of truly astonishing lengths [javalobby.org] were generated.
Watching all of this transpire made me incredibly embarrassed of the Java community. (Note: Predictable smart-ass comments can be inserted after the previous sentence.) The hue and cry was simply amazing and, let's face it, immature. "I want Java6 *now* and since it's not there I'm abandoning the Mac as my platform!" In other words: "I'm taking my toys and going home." Very, very few of the complaints were from people who actually depend upon Java6, i.e. are building apps with it. Instead, there was a large sense of entitlement that was unjustified and exhibitied a childish impatience that was amazing to watch, with a strong dose of the usual fanboy/hater streetfight.
*shrug* There were two choices that were much less reactionary: (a) wait for the Apple release Java6 or (b) work on the OpenJDK project. Kudos to Landon for doing this. It's a big start, and will hopefully generate enough interest to move it forward significantly.
Of course, people like to bitch, and neither of those choices fulfills that need.
Re:Java whiners (Score:4, Insightful)
Re: (Score:2)
You forgot 3) "switch to an operating system where your development tools aren't beholden to the whims of a single OS+Hardware vendor"
Umm, I think this article in part demonstrates that on OS X your tools are not beholden to the whims of Apple, if anyone seriously thought they were. Apple is providing less support for Java in their included dev tools, but it is not like there are not other popular development tools like Eclipse and obviously not even the runtime is being held up significantly by Apple's glacial pace.
Personally, I think Apple is making a mistake by ignoring Java, but then again, why should they do all the work when othe
Re: (Score:2)
Likely many will dance in the streets.
And convince your customers to do likewise (Score:2)
Re:Java whiners (Score:5, Informative)
It's the not knowing which is causing *most* of the frustration, not the fact that it's not here right now. Sure, some people might be playing the 'taking my toys home' attitude, but I think the issue is bigger than that. People have staked their careers on Java and on Macs, and now there's a disconnect. When your livelihood is at stake, you might get a bit bitchy. When it's being caused by Apple, a company people get very passionate about, you might get a bit more bitchy.
Re: (Score:2)
Also Apple always outlined that the final feature set of Leopard would be locked down until it shipped.
Re:Java whiners (Score:5, Insightful)
Java 6 was released in 2006. Java 5 is from 2004. People aren't crying "we want Java 6 now," they're saying "we'd like your 'first-class' citizen to be updated to something written in the last three years." I don't think that this is unreasonable.
Re:first class what? (Score:4, Interesting)
(I used the be a MacOS developer by day, and then became a Java developer by day. I continued through Rhapsody development and finally threw in the towel with 10.1.)
Re: (Score:2)
Re: (Score:2)
You say that as if there's necessarily some Java6 Apple release to wait for. AFAIK, Apple's had no comment on when-or-if they plan to release a Java 6. It was in Leopard, and then it wasn't. For all we know, it could be completely dropped due to the licensing issues above.
Re: (Score:2)
Sun insists that everyone who contributes back to the main java tree signs a contributor agreement so that sun can offer that code under any license they like.
Intel Only for now (Score:2)
Just wanna say thanks (Score:2)
java 6 is available for osx from apple already... (Score:2)
Re: (Score:2)
First, there is a "Java release 6" available for OS X which is not Java 6, it's a sixth release of Java 5 for Tiger. If you carefully read the blurb on Apple's developer site, it does say that it is in fact a newer release of JDK 1.5, not JDK 1.6 (aka Java 6).
Second, Apple made a beta of Java 6 available long before Leopard came out. The early access release of Java 6 coincided roughly with JavaOne 2006; I actually attended the BOF session wi
Re:java 6 is available for osx from apple already. (Score:2)
There was some sort of "developer release candidate", but I can't find it on the Apple dev site anymore, and have seen blog comments that suggest it's been pulled.
warning 'Java is slow' troll alert in 3..2..1.. (Score:2, Interesting)
This has been shown in, what, the eighties, by HP with their project Dynamo, reordering on the fly assembly
It's okay guys! I just got the memo (Score:2)
Please don't hit me...well not hard anyway. I first started doing object oriented programming on Mac OS X with Java so this story does hit a cord. I can't help but wonde
Re: (Score:2)
I changed to eclipse and everything is blazingly fast.
Re: (Score:2, Funny)
Re: (Score:2)
Re: (Score:2)
*Whoooosh* [wikipedia.org]
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Informative)
Re: (Score:2)
Re: (Score:2)
Considering the out come of the Fortran vs. ASM battle I talked about I think that day will come. It makes me wonder if FireFox were written in Java would it still have the memory leak issues it has been having (and yes there are ways to make memory leaks in Java. It's just harder). In any case I just look forward to the day where anytime a program is written in Java people don't immediately consider it slow and wo
Re: (Score:2)
It is similar enough that there are a number of programs that can turn java bytecode back into reasonablly readable (you lose local variable names and comments but the structure stays pretty much the same) java source code.
IIRC the ammount of optimisation possible at compile time is very limited due to needing to pass the bytecode verifier.
Nope (Score:4, Informative)
No J2SE 6 there.
Re: (Score:2)