View Full Version : Cocoa - Obj C and Java?
Sep 24, 2004, 11:21 AM
Can you intermix languages when writing a Cocoa application? I would love to leverage some of my java skills, as well as some Open Source APIs, AND use Obj-C...I know when you start a project, it asks what language you are going to use. Has anyone done this? Is it possible?
Sep 24, 2004, 12:45 PM
When you start a project, it's really asking what language will be at the core. The above documents how to pull in Java, and there really isn't anything special about using ordinary C functions in ObC, just go ahead and #include and call 'em from inside your ObjC methods.
Sep 24, 2004, 12:47 PM
I just can wait til I get my two books (hopefully today), so I can get started on writing Apps for OS X.
Sep 26, 2004, 10:32 PM
While you can't use Java and Obj-C together, you can use Obj-C and C and C++ together (known as Objective-C++). You give your implementation files a .mm extension, and so long as you use right Obj-C vs. C++ syntax for the right objects, you'll have no problems.