Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a jnilib to Intel



Eric,

Before posting my questions, I *DID* download, print, and read the "Universal Binary Programming Guidelines". But it did not answer ANY of my questions!

For instance, regarding Rosetta and JNI libraries, the "Guidelines" states:

Rosetta does not run the following:
...
* Bundled Java applications or Java applications with JNI libraries that can’t be translated


I took that as a very ambiguous statement. Obviously, bundled Java applications, in general, WILL run on Mac OS X under Intel, because Apple will port (or has already ported) the JVM and all required, system level native libraries to Intel -- so no translation is required of Java applications, bundled or not, by Rosetta. Of course, that applies to "pure Java" applications, not ones like mine that have their own native libraries. But the above statement also refers to "Java applications with JNI libraries that can’t be translated" -- which CLEARLY (to me) says that "some JNI libraries can be translated, and some cannot". But which ones can and which ones can't?

Secondly, the "Universal Binary Programming Guidelines" talks extensively about building an Xcode project to build a universal binary for a Cocoa application. Nothing at all about Java! Or JNI libraries!

No mention of the GCC options needed to build a universal binary, either -- the "Guidelines" are all written in terms of setting Xcode variables. There is no description of what compiler options are actually GENERATED by these variables! As I stated, I absolutely refuse to use an "IDE". I run compilers and all other tools from the command-line, as God intended. IDEs are VILE!

Bill

Eric Albert wrote:
In article <email@hidden>,
 "William C. McCain" <email@hidden> wrote:


I develop and sell three products that run on Mac OS X. All three products are written in Java and are distributed in the form of a Mac OS X "bundled application". Obviously, the Java code will need no conversion to run "natively" on Mac machines with Intel processors. But all three products use my own JNI library, written in C, for serial I/O.

1. Will Rosetta automatically translate my "libserial.jnilib", which is compiled for a PowerPC, when my products are run on an Intel-based Mac?


No. Java is not supported by Rosetta. This is mentioned in the Rosetta section of the Universal Binary Programming Guidelines, which you can find at <http://developer.apple.com/>.


2. If not, how do I convert "libserial.jnilib" to the "universal binary" format? Do I simply recompile it with the latest GCC (4.0)? If so, what GCC options must I specify to get a JNI-compatible "universal binary"?


Read the Universal Binary Programming Guidelines. Everything you need to know about building universal binaries should be in there.

Hope this helps,
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Converting a jnilib to Intel (From: Eric Albert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.