Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] Cocoa-Java bridge



Hello.

May I ask about the Cocoa-Java bridge? Yes. I know that the Cocoa-Java integration is not supported for the features after the MacOS X Tiger. But I'm not trying to use some new Cocoa feature using the Java.

I have a Java class I wrote. Let's say that it is a myClass.
When I try loading the "myClass" using the NSClassFromString(@"myClass"),
it returns 0. However, if I try loading some predefined Java class, like java.net.UR, it loads the class successfully.


I put these keys and value pairs in the plist file.

<key>NSJavaNeeded</key>
<string>YES</string>

<key>NSJavaRoot</key>
<string>Contents/Resources</string>

<key>NSJavaPath</key>
<array>
 <string>myClass.jar</string>
</array>

Also, I setup the copy phase of the cocoa native target for copying the class of my Java class to its Contents/Resources.
But, strangely, it can't load the class.

Can someone tell me why and how to fix the problem?
( Would it be better to put the class itself instead of the .jar file? )

Or, is the Cocoa-Java bridge is totally abandoned now, so is the feature broken?

Then, I may need to use the JNI approach, but code structure I should take will be very cumbersome.

Thank you.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.