java-native-access / java-native-access/jna

Inconsistent library suffix on Windows when loading lib from the classpath

Open
#275 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug?
Dominant language
Java
Stars
8.9k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hello,

When you do : Native.register("test");

Then, under Windows, "test.dll" or "libtest.dll" will be searched for in the path. However, under Windows, only "test.dll" will be searched for in the classpath, not "libtest.dll". From my point of view, this behaviour is not consistent.
Under Linux, only "libtest.so" (and not "test.so") is searched for.

Regards

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Native.register("test") library-loading path and trace how Windows classpath lookup differs from the other search locations and from Linux suffix handling. Compare the platform-specific lookup behavior and add or update coverage for both test.dll and libtest.dll; done means the intended suffix handling is consistent and verified on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.