Skip to content

[1.x] Support JDK 25 JEP-512/JEP-445 Main class - #1602

Merged
eed3si9n merged 1 commit into
sbt:1.11.xfrom
eed3si9n:bport/jdk25-main
Sep 27, 2025
Merged

[1.x] Support JDK 25 JEP-512/JEP-445 Main class#1602
eed3si9n merged 1 commit into
sbt:1.11.xfrom
eed3si9n:bport/jdk25-main

Conversation

@eed3si9n

Copy link
Copy Markdown
Member

Problem

sbt currently does not support JDK 25 Main class. JDK 25 supports:

  1. non-public main method
  2. doesn't need Array[String] arg
  3. doesn't have to be a static method

Solution

This fixes the Main class detection for the reference compiler bridge, which is used for Scala 2.10 - 2.12, and Scala 2.13 until 2.13.11. Luckily, 2.13.11 is compatible with JDK 25.

**Problem**
sbt currently does not support JDK 25 Main class. JDK 25 supports:
1. non-public main method
2. doesn't need Array[String] arg
3. doesn't have to be a static method

**Solution**
This fixes the Main class detection for the reference compiler bridge,
which is used for Scala 2.10 - 2.12, and Scala 2.13 until 2.13.11.
Luckily, 2.13.11 is compatible with JDK 25.

Co-authored-by: Lukas Rytz <lukas.rytz@gmail.com>
@eed3si9n
eed3si9n merged commit 041d5ad into sbt:1.11.x Sep 27, 2025
9 checks passed
@eed3si9n
eed3si9n deleted the bport/jdk25-main branch September 27, 2025 22:16
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