Skip to content

Configure Eclipse JDT compiler for Java 21 - #8

Merged
arakelian merged 1 commit into
mainfrom
arakelian/eclipse-type-patterns
Feb 24, 2026
Merged

arakelian merged 1 commit into
mainfrom
arakelian/eclipse-type-patterns

Conversation

@arakelian

Copy link
Copy Markdown
Owner

Summary

Explicitly set sourceCompatibility and targetCompatibility to Java 21 in the eclipse.jdt configuration block. This ensures that when Gradle regenerates Eclipse settings (e.g., on "Gradle > Refresh Gradle Project"), the JDT compiler source level is consistently set to Java 21, which is required for Java 16+ features like pattern matching for instanceof.

Fixes

Resolves the Eclipse error: "the java feature 'type patterns' is only available with source level 16 and above"

🤖 Generated with Claude Code

Explicitly set sourceCompatibility and targetCompatibility to Java 21 in the eclipse.jdt configuration block. This ensures that when Gradle regenerates Eclipse settings (e.g., on "Gradle > Refresh Gradle Project"), the JDT compiler source level is consistently set to Java 21, which is required for Java 16+ features like pattern matching for instanceof.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@arakelian
arakelian merged commit 1db6c6a into main Feb 24, 2026
1 check 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.

1 participant