views:

239

answers:

1

I want to use the NSStatusBar object from my Java application using JNI. I know there's some existing libraries out there but I've tried them and they don't have the correct drop down menu.

I'm starting from the "Java JNI Application" template in XCode and I simply put

NSString *str=@"";

to see if it could compile but this produces compilation errors when no other changes are made.

I assume I need to change some settings in the project configuration or add some header files to get this to work.

What needs to be done to allow me to use Objective-C/Cocoa starting from the "Java JNI Application" template?

(I'm assuming this tempalte is the best place to start but let me know if I'm wrong). Thanks.

OSX10.5.8 XCode3.1.3

+1  A: 

You probably need to add Foundation to your imports, and rename the file from .c to .m

#import <Foundation/Foundation.h>
AlBlue