It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to add 3rd party jar library, that uses JNI and depends on platform dependent library (dll)?

Hi everyone, 

Task: to use a jar, that requires platform dependent libraries.

What was done: created a local maven repository, installed jar file and dll file there. 

<name>InPlugin Repo</name>
 Symptoms: after installing jar file and adding dependencies I can see that my plugin component dependencies, which are located in this jar are resolved, but I recieved some new unresolved dependencies which I can see in Apache Felix Web Management console Imported Section for my plugin and I guess, they are related to this dll file
Besides, I have a guess: May be dll can't be used by a jar as it is strictly build on filename pattern and maven adds it's version.
May be there is a different way of managing such dependencies? Thank you in advance for your directions. 

2 answers

Thank you Robert. Definitly right direction. However I still have some problems, as there are restrictions for the file name of the external jar and corresponding libraries. But I'll try to overcome them with maven dependency plugin destFtleName option.

0 votes

I am not sure that there's a good reason to mix technologies.

Jar files are almost always Java objects, and dll's are usually "dynamic link libraries" built in a C variant.  To "import a dll" in a java based system such as JIRA, you'll have to provide a whole framework to support your dll and translate between the two technologies.

Could you step back and explain what you are trying to achieve?  Not the "I want to use X for Y", but what the end goal is for the user?

We have a 3rd party Java library, that uses some low level network communication functions through JNI. Libs for several platforms provided. There is no option "just not to use it". 

That does not answer the question.  I specifically asked you not to say "use X for Y".  What is the end goal for the user?

Also, whatever you're doing, is there a Java library for it?  Because if not, you'll have to implement a whole framework inside your add-on.

Have similar use case.  Need to integrate JNI app that includes jar, dll, and lib files.  Have substantial legacy code accessing app from different languages and frameworks.  Can't practically tell vendor to rebuild app from native C code using maven, need to provide our own solution.  Our use case doesn't seem technically difficult in principle---it's only four files.  

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted yesterday in Jira

Upcoming Enterprise releases targeting Q3 2019: Jira Software 8.5 & Jira Service Desk 4.5

Since launching the Jira Software 8.0 and Jira Service Desk 4.0 platform releases in February, many of you have been asking when the next Enterprise release will be so you can take advantage of the m...

267 views 3 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you