Cocoa Java Applications

Discussion in 'Mac Programming' started by MacFan26, Apr 12, 2007.

  1. MacFan26 macrumors 65816

    MacFan26

    Joined:
    Jan 8, 2003
    Location:
    San Francisco, California
    #1
    Am I right that all type of Cocoa Java applications are deprecated? I was going to try to write a small networked Cocoa Java program with Java networking...I don't know if it's a good idea but I don't know Obj-C networking. I've been reading some of the documentation on it, but it's a little confusing, does anyone know anything about this that might be able to explain it differently?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    The Java bridge for Cocoa has been deprecated and will not get updated. None of the new classes/features in Cocoa in 10.4 were added to the bridge and this will continue. At some point in the future a version of OSX will ship without the bridge at all.So you would be better off leaving Java alone if you want to write a single process app.

    Networking in Cocoa itself is fairly confusing but you have to remember that you can drop to normal straight C and just use Unix level networking at a C level. There a are numerous socket wrapper classes available that bring this API back up to the Cocoa/ObjC level.

    The other option is to write the GUI in Cocoa and have it launch a Java sub-process to do the networking. The two processes would be able to communicate over pipes.

    A list of available socket classes is on CocoaDev.
     
  3. MacFan26 thread starter macrumors 65816

    MacFan26

    Joined:
    Jan 8, 2003
    Location:
    San Francisco, California
    #3
    Cool thanks, I was looking at the Apple's documentation on NSConnection and NSPort, but I didn't really get very far, haha, probably because I don't know networking very well.
     

Share This Page