Skip to content

[Windows] Native library not found in classpath when using usb4java in IntelliJ (libusb4java.dll missing) #94

@Logarithmique51

Description

@Logarithmique51

Environment

OS: Windows 11 x64

Java: OpenJDK 21

usb4java version: 1.3.0

Build tool: Maven

IDE: IntelliJ IDEA Ultimate / Community

When running a simple UsbServices test in IntelliJ, the program throws:
Caused by: org.usb4java.LoaderException: Native library not found in classpath: /org/usb4java/win32-x86-64/libusb4java.dll

My pom :

        <dependency>
            <groupId>org.usb4java</groupId>
            <artifactId>usb4java</artifactId>
            <version>1.3.0</version>
        </dependency>

        <dependency>
            <groupId>org.usb4java</groupId>
            <artifactId>usb4java-javax</artifactId>
            <version>1.3.0</version>
        </dependency>

        <dependency>
            <groupId>org.usb4java</groupId>
            <artifactId>libusb4java</artifactId>
            <version>1.3.0</version>
            <type>pom</type>
        </dependency>

I can't get what's wrong . Even if i see the dll files in the external library of my project. Thanks

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