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: JNI work fine with default Java5 but not with javase6dp8



On Apr 21, 2008, at 1:37 PM, Youssef wrote:

This is what I use to generate libDrm.jnilib
1- Edit tv.server.DrmNative class and compilte it using Netbeans 6.0. Netbeans is set to use Java6 (Preview8 downloaded from connect.apple.com).
In Terminal ,run
2- javah -classpath /Volumes/Build/Builds_Data/BInstance.build/ classes -jni tv.server.DrmNative
3- cc -g -I/System/Library/Frameworks/JavaVM.framework/Headers -c - o DrmNativeImpl.o DrmNativeImpl.c
4- cc -o libDrm.jnilib DrmNativeImpl.o -framework JavaVM
And I put libDrm.jnilib in /usr/lib/java

That will produce a 32-bit library. Somewhat confusingly, GCC defaults to producing 32-bit output, even on a 64-bit machine. You'd need to change it to something like


3- cc -m64 -g -I/System/Library/Frameworks/JavaVM.framework/Headers -c -o DrmNativeImpl.o DrmNativeImpl.c


for it to be 64-bit. (I typed that in Mail.app, so read the GCC man page to see if I'm remembering the command line option correctly.)

-Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com


_______________________________________________ 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: JNI work fine with default Java5 but not with javase6dp8 (From: Greg Guerin <email@hidden>)
 >Re: JNI work fine with default Java5 but not with javase6dp8 (From: Youssef <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.