• 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: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error


  • Subject: Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error
  • From: Greg Guerin <email@hidden>
  • Date: Sun, 14 Jun 2009 20:06:47 -0700

Tejas Vora wrote:

So you think the problem is due the 64 bit mac ??I am not clear about your
observation on the exception.


Yes, the problem is due to the 64-bit mac. More specifically, it is due to Java 6 on Leopard only running under the 64-bit x86_64 architecture. Java 6 simply doesn't have a 32-bit version on Leopard.

The library being called for, libObjCJava.dylib, is a required library for Cocoa-Java. That library does not contain a 64-bit version, only 32-bit versions (one for i386, one for ppc7400). The fact that it tries to load that library tells me you are, in fact, using Cocoa-Java, whether you realize this or not.

There is no code for x86_64 in libObjCJava.dylib, so it is impossible to use libObjCJava.dylib with Java 6. When NSRuntime looks for an x86_64 in libObjCJava.dylib, it doesn't find one, so it fails. There is no way around this: you can't mix libraries of different architectures in the same process, such as trying to use the i386 version under x86_64 Java 6.

Your options are:
1. Don't use Java 6; use Java 5, which has a 32-bit version.
2. Eliminate all dependencies on Cocoa-Java, which will then remove the need for libObjCJava.dylib.


I don't know how practical either of these options are. If neither one is practical, then your program can't run on Leopard.

  -- GG

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);
  • Next by Date: Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error
  • Previous by thread: Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error
  • Next by thread: Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error
  • Index(es):
    • Date
    • Thread