• 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: [?? Probable Spam] Re: Java JNI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [?? Probable Spam] Re: Java JNI


  • Subject: Re: [?? Probable Spam] Re: Java JNI
  • From: "Thorsten Knieling" <email@hidden>
  • Date: Thu, 20 Dec 2007 10:14:14 +0100

Hi,

it's solved and so simple.

The magic here is the suffix. The library has to be named as lib<name>.jnilib instead of
'normal' shared library with lib<name>.so .
That's all. Thanks for help.

Bye,
 Thorsten


2007/12/20, Rustam Muginov <email@hidden>:
There are several technical notes and samples on the http://developer.apple.com about Java and JNI, like this:
http://developer.apple.com/technotes/tn2005/tn2147.html

As for compiler flags, you can always use Xcode example and look onto the parameters passed to the gcc/ld in the build progress window, then re-use them in your own makefiles.

--
Sincerely, 
Rustam Muginov


On 20.12.2007, at 11:12, Thorsten Knieling wrote:

Hi,

perhaps anybody here now the answer. I didn't found anything with Google.

I'd like to use native C-code called via Java JNI interface. On other platforms (Linux, HP-UX, Solaris etc.) all went well.
You see it's an porting issue.

All I want to do is to compile an JNI stub (shared library) load in Java via
System.loadLibrary(libraryStubName);

I tried it on Leopard with 32- and 64-Bit. I don't like to use Xcode. I need the core gcc compiler options.
The options I already tried are
gcc -dynamiclib -undefined dynamic_lockup -o libstub.so stub.c

The stub was not loaded or found by java although DYLD_LIBRARY_PATH is set. Is there an other logic where
java found it's JNI stubs?

Thanks in advanced for helping,
 Thorsten

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
email@hidden


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

This email sent to email@hidden

References: 
 >Java JNI (From: "Thorsten Knieling" <email@hidden>)
 >[?? Probable Spam] Re: Java JNI (From: Rustam Muginov <email@hidden>)

  • Prev by Date: [?? Probable Spam] Re: Java JNI
  • Next by Date: Re: How does 'Finder' open an application and bring the window to the front?
  • Previous by thread: [?? Probable Spam] Re: Java JNI
  • Next by thread: Linker error
  • Index(es):
    • Date
    • Thread