• 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
Re: Cocoa & Java on Intel fails with "Java for ppc cannot run in this configuration"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa & Java on Intel fails with "Java for ppc cannot run in this configuration"


  • Subject: Re: Cocoa & Java on Intel fails with "Java for ppc cannot run in this configuration"
  • From: Niels Meersschaert <email@hidden>
  • Date: Thu, 4 May 2006 12:52:04 -0400

In addition to the SDK, are you targeting both Intel & PPC architectures? Your final binary will need to be a universal binary to avoid this message. You can check that by getting info on your binary if it just says PowerPC, you only compiled against the framework, but didn't build a multi-architecture binary. In that case, the app launches in Rosetta on Intel & since it can't run the JVM in Rosetta, you'd get the message you describe. You can change that directly in your target build configuration for Architectures. Normally, you'd only build for other architectures on release builds (I think they are enabled by default on new projects after 2.2).

On May 4, 2006, at 2:54 AM, Alexander Hartner wrote:

I verified that I am compiling against the 10.4 Universal Target SDK, but the problem still seems to be there. I am beginning to wonder if this is still supported on intel. Has anybody got experience with this ? The option of spawning another process is not viable, as I have to pass a lot of objects to the Java classes. I could write them to a single file and read that from Java, but I really don't want to do this.

I can't test it myself (no intel hardware), but one of the users has an intel machine, so I have to take his word for it.

Thanks
Alex


On 30 Apr 2006, at 19:48, John Stiles wrote:

Rosetta does not support Java.
Have you tried making your app Intel-native? Does it work then?
Alternatively, I suppose you could spawn a new process instead of trying to fire up a VM inside your own process.



Alexander Hartner wrote:
I have an Cocoa Application which internally creates JVM via :

NSJavaVirtualMachine *jvm = [NSJavaVirtualMachine defaultVirtualMachine];
printf("CLASSPATH %s \n",[[NSJavaVirtualMachine defaultClassPath] cString]);
[jvm initWithClassPath:@"Contents/Resources"];
id connectorClass =[jvm findClass:@"com.j2anywhere.ldap.Connector"];


On PPC this works great, but on intel I get the following message :

Java for ppc cannot run in this configuration.
Please consult documentation.
-[NSJavaVirtualMachine initWithClassPath:] cannot instantiate a Java virtual machine
Started Initialize LDAP Connector
Initialize
Java for ppc cannot run in this configuration.
Please consult documentation.
-[NSJavaVirtualMachine initWithClassPath:] cannot instantiate a Java virtual machine
CLASSPATH /Users/vincent/Library/Java:/Library/Java:/System/ Library/Java:/Network/Library/Java:/System/Library/Frameworks/ JavaVM.framework/Classes/classes.jar:/System/Library/Frameworks/ JavaVM.framework/Classes/ui.jar
Reading Preferences


I am not performing any ui in java, just communication with the backend. So I don't need the Cocoa / Java. All I need to do it to use the JVM to call my class. Is there an easy / quick way to get my application to work on intel ?

Alexander Hartner
email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Cocoa & Java on Intel fails with "Java for ppc cannot run in this configuration" (From: Alexander Hartner <email@hidden>)

  • Prev by Date: RE: Equivalent of isKindOfClass for Foundation Types?
  • Next by Date: Re: show and hide NSWindow
  • Previous by thread: Re: Cocoa & Java on Intel fails with "Java for ppc cannot run in this configuration"
  • Next by thread: Re: Cocoa & Java on Intel fails with "Java for ppc cannot run in this configuration"
  • Index(es):
    • Date
    • Thread