Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Java 6 Available on OSX Thanks to Port of OpenJDK

Posted by Zonk on Tue Nov 27, 2007 12:22 PM
from the can't-believe-we're-denied-coffee dept.
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."
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by Anonymous Coward on Tuesday November 27 2007, @12:27PM (#21493279)
    "Many Mac users have been upset that Apple has not made Java 6 available on the platform."

    I'd have thought not having Java infecting your machine would be a huge advantage myself. Not having .Net is another.
    • Re:Maybe it's me (Score:5, Interesting)

      by FatherOfONe (515801) on Tuesday November 27 2007, @03:55PM (#21496111)
      Yeah, and lets add a few more to the list.
      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:Maybe it's me (Score:5, Informative)

        by AmaDaden (794446) on Tuesday November 27 2007, @12:55PM (#21493675)
        That does not mean that other people would not benefit from it. Java 6 has a number of performance and GUI improvements. http://en.wikipedia.org/wiki/Java_version_history [wikipedia.org] Anyone would be happy if their programs were faster, better looking and more responsive.
          • Re:Maybe it's me (Score:5, Informative)

            by nostriluu (138310) on Tuesday November 27 2007, @05:08PM (#21497207) Homepage
            Azureus, Limewire, LightZone and Cyberduck are all popular applications written in Java, along with a large number of mobile device apps (see http://mobits.com/jad/ [mobits.com]). What Java tries to do - generalize the runtime and provide a programming language for all operating environments - is quite a task, and after a decade it has considerable success in some fields. It is really a shame that it has been subject to bad impressions and innumerable political moves that in the end just take away another choice from the end user.
  • Not Open JDK based (Score:5, Informative)

    by bafio (879076) on Tuesday November 27 2007, @12:27PM (#21493281)
    It is not OpenJDK, but "based on the BSD Port of Sun's Java 6 JDK, and is made available under the Java Research License"
    • by Anonymous Coward on Tuesday November 27 2007, @01:12PM (#21493893)
      Correct. It'll based off OpenJDK as soon as we've got the project instantiated within the porters group in OpenJDK.

      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
  • Java whiners (Score:5, Insightful)

    by revscat (35618) on Tuesday November 27 2007, @01:40PM (#21494213) Homepage Journal

    (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)

      by Knara (9377) on Tuesday November 27 2007, @02:02PM (#21494529)
      You forgot 3) "switch to an operating system where your development tools aren't beholden to the whims of a single OS+Hardware vendor"
    • Re:Java whiners (Score:5, Informative)

      by mgkimsal2 (200677) on Tuesday November 27 2007, @02:30PM (#21494905) Homepage
      I'm not sure the entire issue was that it wasn't released day 1 with Leopard, but that there wasn't any information on it. Had Apple said "we will release a Java6 Q1 2008", people who *do* write Java software would have a target date for when their businesses could do what they needed to. And had Apple said "we will never support Java6 on Leopard or in the future versions of OS X", people could also have made appropriate changes. Instead, Apple had preview releases of Java6, then removed all mention of them and made no mention of Java at all when Leopard was released. When asked about Java plans, Apple has not responded.

      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:Java whiners (Score:5, Insightful)

      by thomas.galvin (551471) <`angel_13138' `at' `yahoo.com'> on Tuesday November 27 2007, @02:36PM (#21494997) Homepage

      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!"
      When I made the switch to Mac, one of the big selling points was Apple's clear statements that "Java was a first-class citizen," and "the Mac is the best Java development environment available." And for a long while, that was true.

      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)

        by micromuncher (171881) on Tuesday November 27 2007, @06:47PM (#21498381)
        You have fallen to the Apple PReng machine! In 1995 Apple said the Mac would be the best Java development platform at WWDC. Repeated in 1996. Yes, pre-Jobs/OSX, but subsequently Apple would put ONE developer on Java/JDK ports, a position oddly they found hard to staff (heck, they asked me), and as I understand it, this under-resourcing of Java development has continued to this very day.

        (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.)
    • by TheNarrator (200498) on Tuesday November 27 2007, @01:03PM (#21493777)
      JRuby is actually faster on a lot of benchmarks now then straight C Ruby (see the link in the above article to the blog post). This is because Jruby turns ruby into Java bytecode. Java's JIT can do lots of special runtime optimizations to the compiled bytecode that C Ruby can't. With each version, the JVM has been getting better and better at doing these optimizations. It's nice because if I wrote a program in C it would always be the same speed unless I upgraded the hardware. With Java the software just gets faster and faster with each version because the JVM gets smarter.
        • by ClassMyAss (976281) on Tuesday November 27 2007, @01:56PM (#21494443) Homepage
          Yes, the JIT compiler is written in C, but you are wrong that a better optimizing C compiler could beat a really good JIT. The whole point of JIT is that it can use current information about how a program is running and do things like arrange objects in memory to increase the cache hit rate. The best C compiler in the world just doesn't have the amount of information available that it would need to do things like this.

          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...
            • by 0xABADC0DA (867955) on Tuesday November 27 2007, @05:39PM (#21497601)
              What's so interesting about it is that Microsoft's copy of Java, C#, was concerned about being the fastest language so they make a lot of hacky choices purely based on what they thought would be fastest. Things like:

              * 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. .. and so on.

              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.
        • by Headius (5562) on Tuesday November 27 2007, @03:09PM (#21495437) Homepage Journal
          JRuby itself uses only about as much memory as Ruby does for most apps we test. But we do pay a one-time cost for the JVM itself, which adds 25-30MB to the process. However on a server deploying Rails, this is insignificant compared to the memory eaten up by Ruby runtimes, and we're smaller there by most measurements.

          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.
      • by Surt (22457) on Tuesday November 27 2007, @12:50PM (#21493593) Homepage Journal
        Why would anyone ever use anything but assembly? The rest is all syntactic sugar. Even if you need portability, you need only go as far as c.

        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.
        • by Gr8Apes (679165) on Tuesday November 27 2007, @01:09PM (#21493845)
          There's another reason to run JRuby - the ability to dynamically change a code snippet by users inside a larger application for custom rule engines, as an example.

          Java allows it as well, but it's much harder to sandbox dynamically uploaded java code than a scriplet.
      • by MBCook (132727) <foobarsoft@foobarsoft.com> on Tuesday November 27 2007, @12:50PM (#21493595) Homepage

        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:Why Apple? (Score:5, Informative)

      by scheme (19778) on Tuesday November 27 2007, @12:52PM (#21493609)

      Many Mac users have been upset that Apple has not made Java 6 available

      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:Why Apple? (Score:5, Informative)

      by el_chupanegre (1052384) on Tuesday November 27 2007, @12:53PM (#21493637)

      Shouldn't they be upset at Sun? Why is Apple getting the flack?

      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:Why Apple? (Score:5, Interesting)

      by kwolf22 (825499) on Tuesday November 27 2007, @01:03PM (#21493779)

      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

      • Re:Why Apple? (Score:5, Informative)

        by 0racle (667029) on Tuesday November 27 2007, @01:01PM (#21493741)
        Apple does provide, and always has, Java for OS X. It has always been an integrated application environment, hence the collective 'Huh?" when Java 6 didn't show up with Leopard.

        http://www.kernelthread.com/mac/osx/arch.html
          • by mean pun (717227) on Tuesday November 27 2007, @03:48PM (#21496021)

            Strikes me as an indictment of human behavior. Do you praise apple for all of the previous times that they ported java, or condemn them for the one time that they don't?

            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.

    • Clueless (Score:5, Informative)

      by FranTaylor (164577) on Tuesday November 27 2007, @12:58PM (#21493715)
      Apple integrates their Java into the OS, but a standalone JDK exists within its own directory tree and doesn't interfere with anything else. I have 4 different JDKs installed on my machines and they don't interfere with each other or the resident JDK.
    • Nope (Score:4, Informative)

      by apsmith (17989) * on Tuesday November 27 2007, @01:19PM (#21493993) Homepage
      Here's the text from the "release 6" developer preview 1:

      Java for Mac OS X 10.4, Release 6 delivers improved reliability and compatibility for Java 2 Platform Standard Edition 5.0 and Java 1.4 on Mac OS X 10.4.10 and later. This release updates J2SE 5.0 to version 1.5.0_13 and Java 1.4 to version 1.4.2_16.


      No J2SE 6 there.