• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Java Bridge - Use Java in ObjC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Java Bridge - Use Java in ObjC
      • From: Cody Brimhall <email@hidden>
  • Prev by Date: Need help printing a webView...
  • Next by Date: java class path and '/' character in directory names
  • Previous by thread: Need help printing a webView...
  • Next by thread: Re: Java Bridge - Use Java in ObjC
  • Index(es):
    • Date
    • Thread