Skip to content

Main class detection: recognize simpler main methods in Java 25 (JEP-512) #3886

@lrytz

Description

@lrytz
$> cat T.scala
class A {
  def main(): Unit = println(1)
}

$> scala-cli T.scala
Compiling project (Scala 3.7.3, JVM (25))
Compiled project (Scala 3.7.3, JVM (25))
[error]  No main class found

$> sc T.scala
> scala compile --server=false -S 2.13 -d . -release 8 T.scala

$> jar cf run.jar A.class

$> scala-cli -S 2.13.16 run.jar
[error]  No main class found

cf sbt/sbt#7384

Metadata

Metadata

Assignees

No one assigned

    Labels

    jvmIssues tied to the JVM platformmissing featureSomething should have been implemented, but wasn't.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions