Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Xcode: Accessing Java from Objective C' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Xcode: Accessing Java from Objective C
Authored by: macFanDave on Mar 27, '04 12:07:00PM

The timing of this article is very coincidental. While I've been using ObjC for quite a while, my next project at work requires that I learn Java and I started this week. Naturally, the topic of this article intrigued me.

I followed the instructions as precisely as I could and had only partial success. The first half of main executes fine (the java_util_Vector part), but the HelloBridge section fails.

The "JavaClasses" target builds successfully, but the HelloBridge target gives me the following warning:
[code]Dependency analysis: warning: no rule to process 'HelloBridge.java'[/code]

and then running the code yields this:

[code]
Java HotSpot(TM) Client VM warning: Attempt to guard stack yellow zone failed.
Java HotSpot(TM) Client VM warning: Attempt to guard stack red zone failed.
2004-03-27 10:53:18.050 HelloBridge[2697] Item 1=One item!
2004-03-27 10:53:18.086 HelloBridge[2697] *** Uncaught exception: <java/lang/ClassNotFoundException> HelloBridge

HelloBridge has exited due to signal 5 (SIGTRAP).
[/code]

(Note that the statement that executed at 10:53:18.050 shows that the java_util_Vector part succeeded.)

Can you tell from these outputs what went wrong? If not, I'd be happy to send you the whole project for closer examination.

Thank you.
Dave



[ Reply to This | # ]
Xcode: Accessing Java from Objective C
Authored by: joadan on Mar 28, '04 12:59:15PM

I think you forgot step 8, you must build the java target before you build the main target.

Joakim

---
jocke



[ Reply to This | # ]
Xcode: Accessing Java from Objective C
Authored by: kirankumareffig on Oct 25, '05 06:41:59AM

To my surprise even iam facing the similar problem.
All iam doing is initialising a java class thru Objective -c, and calling a method(that takes NSdictionary as a parmeter) on the created obect. In the java class iam taking a Hashtable as the relative to NSdictionary.

In the java class object, method is being called properly. But the only thing that intriguing me is , the size of the hashtable. It is being displayed as 1782626377.
And iam unable to access the values in the hash table.



[ Reply to This | # ]