0

I Have a program that I created in Netbeans that uses jacob-1.18.jar to open a HTML Outlook email. jacob-1.18.jar requires a dll to work (jacob-1.18-x64.dll). This DLL is stored in project folder and application works perfectly on my PC using Netbeans compiler.

The issue I'm having is when I give the JAR file to another person they cannot use it as they do not have dll file. I understand that I need to export the DLL with the Jar File and then when it runs it needs to add to java library path (System.load) but there does not seem to be clear solutions online for this issue which has dated back as far as 2009.

I also cannot just add the DLL C:\Program Files (x86)\Java\jre1.8.0_361\bin on other persons laptop as that folder has admin privileges due to being a work laptop.

Is there any new methods available for this issue or can anyone supply code that is easy to understand and execute .

enter image description here

Read through past issues on stack overflow

4
  • You haven't specified how you created your NetBeans project (Maven vs. Ant vs. Gradle) but regardless of that you might want to take a look at this SO question: What is an uber JAR file?. Creating an uber jar (aka fat jar) can potentially solve your problem.
    – skomisa
    Commented Oct 11, 2023 at 8:44
  • I am using ANT. Can a Uber Jar be created under this configuration ? Commented Oct 11, 2023 at 9:05
  • There's a very old article from Oracle titled Use NetBeans IDE 6.7 to Combine JAR Files Into a Single JAR File that describes how to do this for an Ant project. Obviously that won't provide a set of step-by-step instructions for your specific situation, and some details may be out of date, but it should help to get you started. There may also be relevant questions here on SO, though most people now create Maven projects rather than Ant projects, and Maven instructions won't be applicable for your project.
    – skomisa
    Commented Oct 11, 2023 at 9:27
  • Hello i tried to use this but seems to be for a very old version of Netbeans V6.7. I have V8.2. Commented Nov 20, 2023 at 14:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.