Skip to content

Fix build on modern JDKs by bumping Maven compiler level to 8#113

Open
gupta-8 wants to merge 1 commit intoLaurieWired:mainfrom
gupta-8:patch-1
Open

Fix build on modern JDKs by bumping Maven compiler level to 8#113
gupta-8 wants to merge 1 commit intoLaurieWired:mainfrom
gupta-8:patch-1

Conversation

@gupta-8
Copy link

@gupta-8 gupta-8 commented Dec 28, 2025

Fix build failure on modern JDKs

Problem

Building this project with modern Java versions fails with the following error:

Source option 5 is no longer supported. Use 8 or later.

This happens because the pom.xml does not explicitly set a Java compiler level, causing Maven to fall back to an unsupported default on newer JDKs.

Solution

This PR explicitly sets the Maven compiler configuration:

  • maven.compiler.source = 8
  • maven.compiler.target = 8

This restores compatibility with modern JDKs while keeping bytecode compatible with older runtimes.

Why Java 8

  • Java 8 satisfies Maven’s minimum supported compiler level
  • Compatible with newer Ghidra/JDK environments
  • Avoids forcing users to build Java 21–only artifacts

Scope of Change

  • Build configuration only
  • No runtime or functional code changes

Related Issue

Fixes build failure on modern JDKs where Maven defaults (or project config) compile with -source 5, which is no longer supported. This change sets maven.compiler.source/target to 8+ to restore mvn package compatibility.
Copy link

@bethington bethington left a comment

Choose a reason for hiding this comment

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

LGTM! Fixes build on modern JDKs. Simple change.

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.

2 participants