Java Bridge - Use Java in ObjC
Java Bridge - Use Java in ObjC
- Subject: Java Bridge - Use Java in ObjC
- From: DevReseune <email@hidden>
- Date: Sat, 19 Jul 2003 19:51:44 +0200
Hi,
I want to call methods of Java class from my Objective C code.
The old Apple's documentation had a document about Java Bridge, and
now, this document isn't in the site. So, how to find documentation?
I saw:
-
file:///Developer/Documentation/Cocoa/Legacy/JavaBridge/
JavaBridge.3.html
-
http://cocoa.mamasam.com/MACOSXDEV/2003/05/1/63268.php -> to correct
a error message
- the bridget tool
- .jobs file
After many tests, I can't call my method. This is an example;
My Java Class
public class MyJavaObject {
public String methodWithStringAndValue(String message, int value) {
return message+" - "+value;
}
}
I want now, in a ObjC code, use this code:
Class MyJavaObjectClass = NSClassFromString(@"MyJavaObject"); // it's ok
MyJavaObject object = [[MyJavaObjectClass alloc] init];
NSString *message = [object methodWithString: @"hello" andValue: 10];
Thanks for your help
Fridiric
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.