Why doesn't Sun develop Java for Mac?

Posted:
in macOS edited January 2014
Now that the eagerly anticipated Java SE 1.5 is out, Mac users are left behind yet again, for months to come, waiting for Apple to catch up with its own JVM.



My question is, why didn't Sun port its JDK to Mac OS X? There isn't any hard feeling between these two companies, and Mac OS X's Unix underpinning should make it easy, or at least possible, to port. Was it a "strategic" decision that Apple made to develop its own JVM? If so, I'll never be able to understand it. Furthermore, Apple's JVM just doesn't seem to be on par with Sun's, performance-wise.

Comments

  • Reply 1 of 16
    kickahakickaha Posts: 8,760member
    Biggest reason?



    Cocoa-Java. Everything has to be able to tie in with the Obj-C runtime. Sun doesn't (and shouldn't) care about it, Apple can't track the Sun development as fast as it would like.



    *shrug*
  • Reply 2 of 16
    gibagiba Posts: 99member
    Quote:

    Originally posted by Kickaha

    Biggest reason?



    Cocoa-Java. Everything has to be able to tie in with the Obj-C runtime. Sun doesn't (and shouldn't) care about it, Apple can't track the Sun development as fast as it would like.



    *shrug*




    But I thought the Cocoa-Java bridge is entirely different from the standard Java JVM/SDK.



    I thought the Cocoa-Java bridge is to allow Mac developers to write Cocoa applications, through the Cocoa API, using the syntax of Java. The result of compiling such application is a Cocoa application that runs natively on the Mac OS X run-time, just like applications written in Objective-C. Therefore these application has nothing to do with the Java JVM/API.



    On the other hand, the Java JVM and API on Mac OS X, or on any platform, is (almost) completely independent from the native run-time and API of the operating system, except a few tight-ins such as AWT and native GUI widgets. As a result, implementing JVM on Mac OS X is no different from implementing JVM on Windows or Unix.



    Am I wrong?

    Eric
  • Reply 3 of 16
    jlljll Posts: 2,713member
    Quote:

    Originally posted by giba

    Now that the eagerly anticipated Java SE 1.5 is out, Mac users are left behind yet again, for months to come, waiting for Apple to catch up with its own JVM.



    My question is, why didn't Sun port its JDK to Mac OS X? There isn't any hard feeling between these two companies, and Mac OS X's Unix underpinning should make it easy, or at least possible, to port. Was it a "strategic" decision that Apple made to develop its own JVM? If so, I'll never be able to understand it. Furthermore, Apple's JVM just doesn't seem to be on par with Sun's, performance-wise.




    Because it would be tagged on - not built in.
  • Reply 4 of 16
    gibagiba Posts: 99member
    Ok, did some research on the web, and it appears Mac OS X Java is actually a port of JVM from Sun.....
  • Reply 5 of 16
    boemaneboemane Posts: 311member
    Quote:

    Originally posted by giba

    But I thought the Cocoa-Java bridge is entirely different from the standard Java JVM/SDK.



    I thought the Cocoa-Java bridge is to allow Mac developers to write Cocoa applications, through the Cocoa API, using the syntax of Java. The result of compiling such application is a Cocoa application that runs natively on the Mac OS X run-time, just like applications written in Objective-C. Therefore these application has nothing to do with the Java JVM/API.



    On the other hand, the Java JVM and API on Mac OS X, or on any platform, is (almost) completely independent from the native run-time and API of the operating system, except a few tight-ins such as AWT and native GUI widgets. As a result, implementing JVM on Mac OS X is no different from implementing JVM on Windows or Unix.



    Am I wrong?

    Eric




    As far as I know,



    The cocoa-Java bridge lets you mix calls from the Java API and the Cocoa API, so that you can implement a Java applicatio using say, Interface Bulder to build to GUI. This way you will end up with a Java application that arent portable.



    .:BoeManE:.
  • Reply 6 of 16
    kickahakickaha Posts: 8,760member
    Yes, the MacOS X JVM is a port of Sun's JVM... with the added pieces to enable the Cocoa Bridge.



    The CB isn't just a way of writing Cocoa using Java *syntax*, it runs the Java code in the JVM, and the Obj-C code in the Obj-C runtime, and the two (wait for it) *bridge*.



    It's the bridging that Apple has to add to Sun's JVM after Sun gets done with it. Hence, the lag. Personally, I don't see the point of Cocoa-Java, but there was a strong cry of "OMG! Java is the hotness! Apple must give us Cocoa in Java or we'll hold our breath a really really long time!" at one point, and here we are.
  • Reply 7 of 16
    gibagiba Posts: 99member
    Quote:

    Originally posted by Kickaha

    Yes, the MacOS X JVM is a port of Sun's JVM... with the added pieces to enable the Cocoa Bridge.



    The CB isn't just a way of writing Cocoa using Java *syntax*, it runs the Java code in the JVM, and the Obj-C code in the Obj-C runtime, and the two (wait for it) *bridge*.



    It's the bridging that Apple has to add to Sun's JVM after Sun gets done with it. Hence, the lag. Personally, I don't see the point of Cocoa-Java, but there was a strong cry of "OMG! Java is the hotness! Apple must give us Cocoa in Java or we'll hold our breath a really really long time!" at one point, and here we are.




    Thanks for clearing this up for me.



    I personally also don't see the point of Cocoa-Java bridge. Being a long time Java developer just starting to learn Cocoa, Objective-C certainly seems to be a more elegant language than Java, that is very easy to learn.



    But I still hope Apple would make porting the pure-JVM/JDK a priority, and do the bridging later.
  • Reply 8 of 16
    It's not just the Cocoa bridge. Apple maintains the Aqua look + feel, which also has to be kept up-to-date. That's a huge task, which takes time. OS X is still a new OS and there may be things in the OS that aren't done/done right, which can also delay the JVM.



    Sun's not doing it because Sun doesn't care about Apple or OS X. There's no business reason for them to do the OS X port.



    There's no business reason for Sun to do an AIX port (for example) either, which is why IBM has to maintain a JVM for AIX. To the best of my knowledge, no other thirdparty JVM supports 5.0 yet. The current OS X JVM is one of the most up-to-date JVMs out there.
  • Reply 9 of 16
    airslufairsluf Posts: 1,861member
    Kickaha and Amorph couldn't moderate themselves out of a paper bag. Abdicate responsibility and succumb to idiocy. Two years of letting a member make personal attacks against others, then stepping aside when someone won't put up with it. Not only that but go ahead and shut down my posting priviledges but not the one making the attacks. Not even the common decency to abide by their warning (afer three days of absorbing personal attacks with no mods in sight), just shut my posting down and then say it might happen later if a certian line is crossed. Bullshit flag is flying, I won't abide by lying and coddling of liars who go off-site, create accounts differing in a single letter from my handle with the express purpose to decieve and then claim here that I did it. Everyone be warned, kim kap sol is a lying, deceitful poster.



    Now I guess they should have banned me rather than just shut off posting priviledges, because kickaha and Amorph definitely aren't going to like being called to task when they thought they had it all ignored *cough* *cough* I mean under control. Just a couple o' tools.



    Don't worry, as soon as my work resetting my posts is done I'll disappear forever.

  • Reply 10 of 16
    Quote:

    Originally posted by AirSluf

    Actually Sun would rather everyone operates like Apple and write their own JVM to the SUN spec. That way Sun could get more royalties.



    This is true



    Quote:

    Originally posted by AirSluf

    Sun doesn't write any of the Unix or Linux JVM's either, just host the finished versions, although some of their engineers are closely involved with the open source projects that do write them.



    This is not true. Sun wrote the Solaris and Linux JVMs. JVMs for other Unix variants (AIX, HPUX, *BSD, OS X, etc) are provided by third parties, and Sun doesn't host them.



    You may be thinking of the initial port of JDK 1.2 to Linux, which was performed with help from the Blackdown project. Blackdown is a separate JVM however, with different performance characteristics than the one Sun developed internally.
  • Reply 11 of 16
    airslufairsluf Posts: 1,861member
    Kickaha and Amorph couldn't moderate themselves out of a paper bag. Abdicate responsibility and succumb to idiocy. Two years of letting a member make personal attacks against others, then stepping aside when someone won't put up with it. Not only that but go ahead and shut down my posting priviledges but not the one making the attacks. Not even the common decency to abide by their warning (afer three days of absorbing personal attacks with no mods in sight), just shut my posting down and then say it might happen later if a certian line is crossed. Bullshit flag is flying, I won't abide by lying and coddling of liars who go off-site, create accounts differing in a single letter from my handle with the express purpose to decieve and then claim here that I did it. Everyone be warned, kim kap sol is a lying, deceitful poster.



    Now I guess they should have banned me rather than just shut off posting priviledges, because kickaha and Amorph definitely aren't going to like being called to task when they thought they had it all ignored *cough* *cough* I mean under control. Just a couple o' tools.



    Don't worry, as soon as my work resetting my posts is done I'll disappear forever.

  • Reply 12 of 16
    Quote:

    Originally posted by AirSluf

    Well Solaris??? Isn't Solaris a Sun Product? Uh-huh.



    Solaris is Unix. You said, "Sun doesn't write any of the Unix or Linux JVM's either", which is incorrect.



    Quote:

    Originally posted by AirSluf

    it's still a financial drain to have to write a JVM compatible with MANY flavors of Linux.



    This is somewhat true, although the drain isn't as bad as you imply. Sun only provides JVMs for i386 and AMD Opteron Linux, and only supports a handful of distributions on those platforms. Furthermore, Sun now ships their own Linux distribution, so there is now a strong incentive to provide a Linux JVM for it. Sun is a huge company; the drain isn't that bad.



    Quote:

    Originally posted by AirSluf

    And not really an indication that Sun writes everyone else's JVM out of the kindness of their heart. It still survival and hardly what Sun would consider a happy situation as it was originally intended for Java's main revenues to be from licensing the JVM and Extension specs to platform vendors. Now they are forced to compete in the service provider space for most of their Java revenues, rather than rake in relatively free license money.



    True. Sun's pretty well fucked right now, for many reasons. On the Java front, my company tried to license the JVM from Sun. It's bloody impossible to do. On the hardware front, Dell et al. have eaten up market share. And Linux is coming on strong against Solaris.
  • Reply 13 of 16
    airslufairsluf Posts: 1,861member
    Kickaha and Amorph couldn't moderate themselves out of a paper bag. Abdicate responsibility and succumb to idiocy. Two years of letting a member make personal attacks against others, then stepping aside when someone won't put up with it. Not only that but go ahead and shut down my posting priviledges but not the one making the attacks. Not even the common decency to abide by their warning (afer three days of absorbing personal attacks with no mods in sight), just shut my posting down and then say it might happen later if a certian line is crossed. Bullshit flag is flying, I won't abide by lying and coddling of liars who go off-site, create accounts differing in a single letter from my handle with the express purpose to decieve and then claim here that I did it. Everyone be warned, kim kap sol is a lying, deceitful poster.



    Now I guess they should have banned me rather than just shut off posting priviledges, because kickaha and Amorph definitely aren't going to like being called to task when they thought they had it all ignored *cough* *cough* I mean under control. Just a couple o' tools.



    Don't worry, as soon as my work resetting my posts is done I'll disappear forever.

  • Reply 14 of 16
    Quote:

    Originally posted by AirSluf

    My violent agreement button is blinking.



    Yes, but so is the check your facts button.
  • Reply 15 of 16
    airslufairsluf Posts: 1,861member
    Kickaha and Amorph couldn't moderate themselves out of a paper bag. Abdicate responsibility and succumb to idiocy. Two years of letting a member make personal attacks against others, then stepping aside when someone won't put up with it. Not only that but go ahead and shut down my posting priviledges but not the one making the attacks. Not even the common decency to abide by their warning (afer three days of absorbing personal attacks with no mods in sight), just shut my posting down and then say it might happen later if a certian line is crossed. Bullshit flag is flying, I won't abide by lying and coddling of liars who go off-site, create accounts differing in a single letter from my handle with the express purpose to decieve and then claim here that I did it. Everyone be warned, kim kap sol is a lying, deceitful poster.



    Now I guess they should have banned me rather than just shut off posting priviledges, because kickaha and Amorph definitely aren't going to like being called to task when they thought they had it all ignored *cough* *cough* I mean under control. Just a couple o' tools.



    Don't worry, as soon as my work resetting my posts is done I'll disappear forever.

  • Reply 16 of 16
    amorphamorph Posts: 7,112member
    There's another reason for Sun to let Apple manage their own JVM (based on Sun's code, of course): Apple sends back optimizations they've made to Sun's codebase (parrticularly the runtime), and Sun has reportedly expressed an interest in that work.



    So Apple is directly contributing to the Java codebase now; or at least, it was as of this information (around Java 1.2).



    So Apple:
    • optimizes the code (generically, and for PPC/AltiVec);

    • ports the UI to Aqua;

    • updates the Cocoa-Java bridge

    The reason I've heard for the enthusiasm about Cocoa Java stems from two interrelated facts: 1) Java's UI on OS X is slow, although the basic engine is fast; 2) There's enough demand for native interfaces generally that it's not unusual to see Java used for cross-platform engines hooked to native interfaces.



    And, I suspect some people just don't want to learn Objective-C.
Sign In or Register to comment.