Re: Selecting a Specific JavaVM for my target
Re: Selecting a Specific JavaVM for my target
- Subject: Re: Selecting a Specific JavaVM for my target
- From: Greg Guerin <email@hidden>
- Date: Mon, 24 Jul 2006 17:18:19 -0700
Paul Archibald wrote:
>Is it a good idea to switch to Java 1.5? Does anyone have any idea how many
>people are using 1.5 instead of 1.4? Will our users freak out?
In order: It depends, it depends, and it depends.
The first depends on what you mean by "a good idea". If it means that it
makes your software work, with little or no disruption for your customers,
then yeah, it's a good idea. If it disrupts your customers, or balkanizes
them, then maybe it isn't a good idea.
The second depends on what you mean by "people". I assume what you really
mean is "how many of our potential customers", but only you know who that
is, what kinds of machines they tend to have, and so on.
The third depends on how your users behave. If they stay up to date, adopt
new OS releases, and so on, then no they won't freak out. If they tend to
lag, not adopt new OS releases, and generally ride the trailing edge of the
technology curve, then they probably will freak out.
>On the practical side, I have not been able to get this working with 1.5,
>probably because of our use of the JavaVM.framework. (We need that because
>we are using JNI.) I have tried setting the Java compiler switches for 1.5,
>and the app builds, but throws a runtime exception:
>
>"java.lang.UnsatisfiedLinkError: createProxyModelClient"
>
>which is our first call into our JNI.
Please post a full stack trace. Just knowing it's an UnsatisfiedLinkError
isn't enough. It could be a class's native method is failing to link to a
native-code function, but it could also be the native library is failing to
load.
The first is solved by ensuring the method name matches the function name,
and there's a native lib with the right architecture. The second is solved
by ensuring the "java.library.path" is correct.
Without a stack trace, and possibly some other information from your
Info.plist, it's impossible to tell exactly what's wrong.
It would also help to know if this JNI-lib has ever worked correctly on Mac
OS X, or if it never has. The first might just need a tweak of a setting.
The second might need large-scale changes to your project. It depends.
>I suspect that I need to change my project settings for this. I have tried
>the Target->Java Compiler Settings->Target VM at 1.4 and 1.5, and
>Target->Pure Java Specific Target VM at 1.4* and 1.4+ (what do the * and +
>mean?).
They're described in Table 1, about mid-page, at this URL:
<http://developer.apple.com/documentation/Java/Conceptual/JavaPropVMInfoRef/Arti
cles/JavaDictionaryInfo.plistKeys.html>
Also see:
<http://developer.apple.com/qa/qa2006/qa1474.html>
You can also search past postings to the Java-Dev list. Target VM and
runtime version come up frequently. However, the solution depends on what
kind of application you're making: so-called "pure Java", JNI invocation
API, Cocoa-Java, etc.
> I have tried all the permutations of these settings. some don't
>build, one builds but throw the runtime exception above, one builds and
>runs, but loads Java 1.4 at startup (we check and report the Java version).
Exactly which settings cause which errors?
It's good that you've tried things systematically, but you also need to
communicate your results systematically.
>The one hting I have not been able to figure out is changing the
>JavaVM.framework version in the project. How do I do that? Will it break
>anything?
What would you change it to? There's only one JavaVM.framework. It
contains all the available JVM versions: 1.5, 1.4, 1.3.
>(I do have Java 1.5 on my machine, and am using Xcode 2.3 OSX 10.4.7)
Is it J2SE 5 Release 4, or is it earlier?
If it's not Release 4, then compiling for and running under Java 5 is much
more difficult.
What CPU architecture?
This might be more appropriate for the java-dev list, so feel free to send
your replies and follow-ups to that list instead of this one.
-- 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