shannah / Java-Objective-C-Bridge

A thin bridge that allows for two-way communication from Java to Objective-C.
123 stars 25 forks source link

Be optimistic with jcocoa library, in case it is already loaded. #2

Open teras opened 9 years ago

teras commented 9 years ago

Just be a little more optimisitc with native library loading, in case it is already loaded in advance with something like System.load(".../libjcocoa.dylib"); in order to get rid of the java.library.path depedency, in case we already know the absolute library path.

shannah commented 9 years ago

Thanks. I have some other changes in the branch "maven" that I'm planning on merging with master soon so I'm not going to merge this pull request yet. I'm going to make the equivalent change to the maven branch first.

teras commented 9 years ago

If you prefer, I can make the same changes to the "maven" tree.

shannah commented 9 years ago

Sure. That would be helpful.

teras commented 9 years ago

If I am not mistaken, the maven version of the library has the binary library inside the JAR file? This seems to make the patch I sent you obsolete? If the native library is already inside, then there is no reason to load it externally.

On Mon, Sep 29, 2014 at 6:05 PM, Steve Hannah notifications@github.com wrote:

Sure. That would be helpful.

— Reply to this email directly or view it on GitHub https://github.com/shannah/Java-Objective-C-Bridge/pull/2#issuecomment-57174643 .

Panayotis Katsaloulis

shannah commented 9 years ago

Yes. The native library is inside the jar in the maven version. I am working toward making it load automatically from the jar ... I still need to make some changes. However it still has to go through the process of extracting the library out of the jar and loading it using System.loadLibrary(), so your patch is not completely obsolete....

teras commented 9 years ago

I saw that this is the same approach as what JNA does. So extractive the native library is presumably the only easy way to do it. :)

On Thu, Oct 16, 2014 at 10:38 PM, Steve Hannah notifications@github.com wrote:

Yes. The native library is inside the jar in the maven version. I am working toward making it load automatically from the jar ... I still need to make some changes. However it still has to go through the process of extracting the library out of the jar and loading it using System.loadLibrary(), so your patch is not completely obsolete....

— Reply to this email directly or view it on GitHub https://github.com/shannah/Java-Objective-C-Bridge/pull/2#issuecomment-59417951 .

Panayotis Katsaloulis

uchuugaka commented 6 years ago

Is this dead?

shannah commented 6 years ago

Not dead. Just don't get a lot of time to work on it. I use it in quite a few of my own projects. Haven't merged this pull request, because haven't had a chance to test it.

mojo2012 commented 4 years ago

@teras can you please merge develop into your branch and then I'll have a look at the PR. I tried to copy your changes but the tests failed afterwards.

Thomas-Vos commented 2 years ago

It would be great if something like this could be merged. This would be very useful to me.