Skip to content

Add Java 9+ module support (JPMS) for jlink compatibility#324

Merged
rlm2002 merged 2 commits intowolfSSL:masterfrom
cconlon:moduleInfo
Feb 6, 2026
Merged

Add Java 9+ module support (JPMS) for jlink compatibility#324
rlm2002 merged 2 commits intowolfSSL:masterfrom
cconlon:moduleInfo

Conversation

@cconlon
Copy link
Copy Markdown
Member

@cconlon cconlon commented Feb 4, 2026

This PR adds Java 9+ module support (JPMS) to wolfSSL JNI/JSSE, enabling use with jlink for creating custom Java runtimes. We maintain full backward compatibility with Java 8, since module-info.java is conditionally compiled in based on Java version.

New Files:

  • src/java9/module-info.java - Module descriptor declaring com.wolfssl module
  • .github/workflows/java-module-test.yml - CI workflow validating module support

Modified Files:

  • build.xml - Added conditional compilation of module-info (Java 9+ only)
  • pom.xml - Added Maven profile for module-info compilation on Java 9+
  • README.md - Added documentation for module support and jlink usage

Both Ant and Maven use conditional compilation based on JDK version:

JDK Used to Build Resulting JAR
Java 8 Standard JAR (no module-info.class)
Java 9+ Modular JAR (includes module-info.class)

The module descriptor:

  • Declares module as com.wolfssl
  • Exports com.wolfssl and com.wolfssl.provider.jsse packages
  • Declares uses java.security.Provider for ServiceLoader compatibility
  • Registers WolfSSLProvider as a java.security.Provider service

Addresses issue: #85

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rlm2002 rlm2002 merged commit baaebe7 into wolfSSL:master Feb 6, 2026
107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants