Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacFan26

macrumors 65816
Original poster
Jan 8, 2003
1,219
1
San Francisco, California
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?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
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.
 

MacFan26

macrumors 65816
Original poster
Jan 8, 2003
1,219
1
San Francisco, California
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.