Skip to content

Unable to load dependeny library BridJ #580

Open

Description

@Ragupathi-Palanisamy

I have generated the jar using JNAerator and I have added dependency dll's of the main dll. I have also mentioned the dependency dll's name to the -dependencies argument. Bridj could only able to load the dependency libraries only when I copy it into PATH Variable paths.

How can I make the dependency libraries to load from the JAR itself?

Activity

  1. wmebrek commented on Feb 2, 2020

    @wmebrek

    Hello,

    I got the same problem, there what I did to resolve it:
    Just before main methede, I put:

    static {
    		try {
    			System.load(new File("./libFolder/lib.dll").getAbsolutePath());
    		} catch (UnsatisfiedLinkError e) {
    			System.err.println("Native code library failed to load.\n" + e);
    			System.exit(1);
    		}
    	}
    

    Hope it help

  2. monika0403 commented on Oct 18, 2021

    @monika0403

    I am trying to use bridj to convert my header .h file into . Jar but don't know how to do that could you help me with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions