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

Factor out java.desktop and java.datatransfer module dependencies

Open
#1,031 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently both jna-5.0.0.jar and jna-platform-5.0.0.jar depend on the java.desktop and java.datatransfer module:

$ jdeps -s jna-5.0.0.jar
jna-5.0.0.jar -> java.base
jna-5.0.0.jar -> java.desktop
jna-5.0.0.jar -> java.logging

$ jdeps -s jna-platform-5.0.0.jar
jna-platform-5.0.0.jar -> java.base
jna-platform-5.0.0.jar -> java.datatransfer
jna-platform-5.0.0.jar -> java.desktop
jna-platform-5.0.0.jar -> java.logging
jna-platform-5.0.0.jar -> not found

This is unfortunate as a lot of good usecases (the MariaDB JDBC driver for example) require JNA without needing anything from the desktop or AWT. This makes it much harder to generate compact JRE images for server-side applications as it forces one to pull in all the desktop-related stuff.

Consider splitting the jars in order to isolate the java.desktop and java.datatransfer related parts in their own module to enable server-side applications requiring JNA to run on much smaller JRE images.

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 by reviewing the module dependencies reported by jdeps for jna-5.0.0.jar and jna-platform-5.0.0.jar, then identify which parts require java.desktop and java.datatransfer. The work is complete when those dependencies are isolated so server-side JNA users can build smaller JRE images without desktop modules.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.