Re: Java Bridge - Use Java in ObjC
Re: Java Bridge - Use Java in ObjC
- Subject: Re: Java Bridge - Use Java in ObjC
- From: Cody Brimhall <email@hidden>
- Date: Sat, 19 Jul 2003 12:53:01 -0700 (PDT)
Dev-
Try this tutorial out, it's a little more useful than Apple's docs.
http://cocoadevcentral.com/articles/000024.php
-Cody
On Sat, 19 Jul 2003, DevReseune wrote:
>
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.
_______________________________________________
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.