Re: no rule to process file
Re: no rule to process file
- Subject: Re: no rule to process file
- From: Greg Guerin <email@hidden>
- Date: Thu, 8 Jun 2006 14:35:45 -0700
Ivan C Myrvold wrote:
>So I start with a "Cocoa-Java Application", even if all my classes will be
>Objective-C classes, and only one class will be a Java class?
Yes, I think so.
>I only need the Java class for JDBC.
It doesn't matter what the Java class is for, it comes down to one thing:
If you want to execute it, you need a JVM.
AFAIK, you have these options for getting a JVM:
1) Use the JNI invocation API.
2) Use manual Cocoa-Java bridging.
3) Use automatic Cocoa-Java bridging.
#1 raises some significant barriers, unless you're experienced with JNI.
#2 likely requires you to manage the JVM yourself, using functions like
NSJavaSetup and its related functions. See, for example:
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSJavaSetup>
#3 happens either because you manually enter the necessary keys into your
app's Info.plist, or because one of Xcode's templates does it for you. The
only template I know of that does it for you is the Cocoa-Java Application.
All the others require you to do it yourself.
Of course, if you want to try creating the proper plist entries yourself,
that could work. Since it doesn't seem like you have a lot of project
settings to preserve, though, it'd probably be simpler to start over with a
Cocoa-Java Application and work it through the conversion. Then you'll
also get to see what the plist entries are, and how they work.
If you want to try manual plist entries, search ADC for NSJavaNeeded, and
read about it and its related keys. There are several keys that start with
the substring "NSJava", and they all work together. If you omit one or get
it wrong, then the JVM won't work. That's another reason for starting with
a Cocoa-Java Application: you start from a known-working state instead of
having to start with nothing working.
You might also benefit from the Cocoa-Java tutorial app, and then apply the
"target splitting" conversion to it, previously described by Nate Roberts's
April posting:
<http://developer.apple.com/documentation/Cocoa/Conceptual/JavaTutorial/>
Again, the advantage is that you start with a known-working application,
rather than having to puzzle out how to get it working at all.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden