Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Java Programming Businesses OS X Operating Systems Apple

Apple Freezes Java Support for Cocoa 154

Nice2Cats writes "A little message on Apple's Developer Connection tells us that Cocoa for Java will get no new features after 10.4. The full text is: 'Features added to Cocoa in Mac OS X versions later than 10.4 will not be added to the Cocoa-Java programming interface. Therefore, you should develop Cocoa applications using Objective-C to take advantage of existing and upcoming Cocoa features.' Is this bad for Java, or bad for Apple, or bad for both, or doesn't anybody give a damn anyway?"
This discussion has been archived. No new comments can be posted.

Apple Freezes Java Support for Cocoa

Comments Filter:
  • by jtshaw ( 398319 ) * on Monday July 11, 2005 @03:27PM (#13035719) Homepage
    All this seams to say is that any new wizzbang features of Cocoa won't be directly accessable with Java... There are already features of the Windows and Linux UI's that Java doesn't use...

    Fact is, Java apps will still work. Still look like MacOSX apps (at least as much as they do today). I don't see how this is much news really.

    If they did have an interface to use these features, it would break cross platform compatibility anyway as they are bound to be Mac specific UI elements.
  • To clarify... (Score:5, Informative)

    by Otter ( 3800 ) on Monday July 11, 2005 @03:28PM (#13035737) Journal
    After reading the comments at MacSlash, I figured it's worth clarifying here -- this has nothing to do with cross-platform Java applications (i.e. what "Java support" normally means). What's being pulled is the ability to write to the native Cocoa API in the Java language.

    Good idea? As far as large software makers go, it probably doesn't matter. Adobe's Mac developers have all learned Objective C already. This does significantly raise the barrier of entry for hobbyist coders, though. Seems like a typical Apple decision, certainly.

  • How? (Score:5, Informative)

    by hargettp ( 74445 ) * on Monday July 11, 2005 @03:56PM (#13036001)
    Please remember, Java is still supported, it is simply the Cocoa-Java bridge that will no longer be improved. If you are not clear on what the Cocoa-Java bridge is (or event Cocoa), then here is a quick primer: Cocoa is the preferred API for Mac OS X, specifically for applications written in Objective-C. The Cocoa-Java bridge was a similar API that exposed essentially the same object model to Java based applications. As the API was specific to Mac OS X, any application written on top of the Java Cocoa APIs was specific to Mac OS X and thus not portable.

    I would expect the impact to Java developers on OS X to be quite low. Most probably use Swing or SWT for cross-platform support, so the impact of this decision should be negligible.
  • Re:What about SWT? (Score:3, Informative)

    by Anonymous Coward on Monday July 11, 2005 @03:58PM (#13036021)
    Apple is currently porting SWT to cocoa (SWT is currently based on carbon). I wouldn't be surprised if thats why Apple's doing this. If you want to use native cocoa, SWT is the roadmap.
  • Not a big deal (Score:3, Informative)

    by SteeldrivingJon ( 842919 ) on Monday July 11, 2005 @04:51PM (#13036577) Homepage Journal

    It really isn't a big deal. Few people use Cocoa-Java to build apps, and it hasn't ever been very well supported or documented.

    It doesn't effect cross-platform Java, won't effect WebObjects (which is 100% Java).
  • by Jeff DeMaagd ( 2015 ) on Monday July 11, 2005 @04:58PM (#13036654) Homepage Journal
    The thing is that the Coaco+Java stuff is what already works for Macintel computers, without porting, and it doesn't need a Universal Binary.
  • by Yaztromo ( 655250 ) on Monday July 11, 2005 @06:22PM (#13037427) Homepage Journal
    I'd be interested in hearing from an actual developer who *is* impacted by this.

    Hello! I'm here!

    I'm doing some development using Cocoa-Java, and this could impact me, although as the information is extremely brief, I haven't figured out yet how or how much it will affect my work.

    I'm in the situation where I already have a very large Java library which was written on other platforms (which has taken ~8 man-years of development effort, and has been heavily debugged and tested int hat time), but works flawlessly on OS X. The Swing application built atop it works on OS X, but many portions of its basic design don't work too well on OS X in terms of UI integration (it works, but it really looks like it was designed for another platform).

    As such, to better support the Mac community, I decided one evening to create a Cocoa version using Cocoa-Java. It took me only about 2 hours of effort, and I had a native Mac version of my application that looks and acts like an OS X application, supporting all of the standard OS X controls and menu items.

    Yes, Apple says I should just use Objective-C, but honestly I have years and years worth of work that has been put into the Java library and engine code. It's completely multi-platform, and is used on multiple platforms. Rewriting it in Objective-C isn't feasible from either a time standpoint, or from a platform availability standpoint (even if I did have years to rewrite and retest all this code in Objective-C, it would then only compile and run on OS X, and perhaps Linux if I was very careful). So it's not going to happen.

    As such, I'm quite possibly impacted by this decision. However, the wording of the "annoucement" leaves much to be desired. Presumably based on their wording, they aren't dropping Cocoa-Java completely -- only that new Cocoa features won't be bridged. The GUI needs for my application are well served by the existing Cocoa-Java bindings, so if Cocoa-Java continues to be installed as a part of OS X, at least my application won't be unusuable before it is released to the public.

    I am a bit surprised in some ways, however. With the announcement a few weeks ago of the move to Intel-based processors, I thought they might actually work to improve Cocoa-Java, due to its immediate cross-platform benefits (although Xcode 2.1 won't generate Universal Binaries for Cocoa-Java projects).

    I'm holding out hope that OS X 10.5 and 10.6 don't drop the existing level of Cocoa-Java support. To be honest, I don't expect every feature of Cocoa to be made available to Java (as it doesn't always make sense to do so), so not putting anything new in, while disappointing, doesn't bother me a whole lot. It's the concern that at some point in the next few years Cocoa-Java could be dropped altogether that worries me.

    Yaz.

  • by larkost ( 79011 ) on Monday July 11, 2005 @07:06PM (#13037760)
    I think that you are fairly safe. Apple has mearly announced that they are not going to produce new bindings for anything after 10.4. They have not marked them depreciated in 10.4 (even then the old bindings would still work), so you have at least through 10.5, and quite likely through 10.6 until your apps are no longer supported. You might even make it to 10.7...
  • by Yaztromo ( 655250 ) on Monday July 11, 2005 @07:46PM (#13038042) Homepage Journal
    Mod the parent down. It's not "Informative", it's "Misleading"

    That's better advice for your response, as opposed to the grandparent post.

    The Java platform (i.e. java.lang.*), never enters into it.

    That's not true. All of the java.lang.* classes are available. In fact, you can even make calls to javax.swing.* classes (although you have to be really careful in terms of event threads, so it's dangerous to do so). Cocoa-Java still uses java.lang.Class, java.lang.Object, java.lang.String, java.lang.Classloader, and any of the other java.lang classes.

    Instead of using javax.swing.JFrame, you use com.apple.cocoa.NSWindow (the exact package name escapes me, but you get the idea), and you compile it into native code using Xcode, not bytecode using javac.

    That is also not true. Cocoa Java bundles include the JAR files for their Java components. Only a small stub is compiled natively. Just view the package contents of any Cocoa Java application and you'll find the JAR file. Or build a Cocoa Java application in Xcode, and see something like the following in the build log (with lots of snippage...):

    JavaCompile.default Cocoa blah.app
    frameworkjars=""
    for i in `echo /System/Library/Frameworks/Cocoa.framework/Resourc es/Java/*.jar /System/Library/Frameworks/Cocoa.framework/Resourc es/Java/*.zip ` ; do if [ -f "$i" ] ; then frameworkjars="$frameworkjars":"$i" ; fi ; done
    classpath="/blah:"`/usr/bin/javaconfig DefaultClasspath`
    /usr/bin/javac -J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8 -g -encoding MACINTOSH -sourcepath ...

    Sorry, but you're talking out of your ass, and have no idea what you're talking about.

    Yaz.
    (Cocoa-Java Developer).

  • Re:Toolkits (Score:3, Informative)

    by jericho4.0 ( 565125 ) on Monday July 11, 2005 @08:00PM (#13038133)
    Objective-C is not some crufty old piece of legacy code that the old coots can't let go of. It's a stupidly simple, elegant extension to C. And there's a lot of good things in C, even with its "shoot yourself in the foot" power. C++ is far more complicated.

    If you know C, a very small language, and are comfortable with objects, then you are an afternoon away from knowing Obj-C. The runtime delivers amazing flexibility, the reason why all the apps on OS X are so feature rich. The GNUStep implementation needs more, but is very powerful as is. It's a fabulous choice for a large system, where the "system" part is very important.

    Again, the C to Obj-C transition is so easy that everyone who knows C should add it to their toolbox.

    As I understand it, work on GNUStep themeing is coming along. I haven't checked it out in a while. The visuals really need freshening up.

  • by Macrat ( 638047 ) on Monday July 11, 2005 @08:53PM (#13038422)

    From the NeoJ Forum [neooffice.org]

    The Java that's used within NeoJ is "pure" Java, AWT and Java 2D at present, and perhaps some Swing in the future. Anything that's using OS X specific frameworks is written in either C++ or Obj-C. Since the majority of the application is already C++ based, we just call the frameworks directly. There's no need for us to add an extra layer with the CocoaJava language bridge and never will be.

  • by putaro ( 235078 ) on Monday July 11, 2005 @09:14PM (#13038520) Journal
    I'd be interested in hearing from an actual developer who *is* impacted by this.

    I am. We ship a commercial app for OS X which is Java/Cocoa. We wanted to have a good, native look and feel so we isolated the UI specific portions using a Model-View-Controller setup and have it running ontop of Cocoa and Swing. Swing does not provide a good enough Mac experience for a commercial app and SWT is not quite right either (the menu bar tends to go wonky, there's no support for sheets...)
  • Re:Toolkits (Score:3, Informative)

    by jericho4.0 ( 565125 ) on Tuesday July 12, 2005 @04:25AM (#13040205)
    gnustep links [gnustep.org]

    The Apple stuff [apple.com] is well done, and much applies to GNUStep. The Apple community is the most active, of course.

  • Third party bridge (Score:5, Informative)

    by Have Blue ( 616 ) on Tuesday July 12, 2005 @09:18AM (#13041359) Homepage
    If there's really demand for Java support of new OS X features, someone else can write a bridge for it- how to do this is well understood. There are already third party Cocoa bridges for Python [sourceforge.net], Ruby [sourceforge.net], and Perl [sourceforge.net].

"Gravitation cannot be held responsible for people falling in love." -- Albert Einstein

Working...