0

what is the value of the source and target version with JDK 15

Build tool -> sbt/maven

i.e javacOptions ++= Seq("-source", "1.10", "-target", "1.10")

Note: Till 11 works fine

Naman
  • 27,789
  • 26
  • 218
  • 353
  • which springboot version you are using – abhinavsinghvirsen Apr 30 '21 at 13:00
  • what is your sbt version and what is your underlying scala version in use? here is a [jdk compatibility matrix](https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#jdk-12-13-14-and-15-compatibility-notes) for reference. how else are you building the project, could you provide a minimal example? – Naman Apr 30 '21 at 17:20

1 Answers1

1

You're out of date on 3 fronts. Java is moving fast these days :)

  • Java dropped the 1.x scheme quite a while ago. It's just 15, not 1.15.
  • Java also dropped the -source -target style. It's release these days.
  • The java command line tools adopted posix style command switches, so, double up the -.

In other words, you're looking for Seq("--release", "15").

rzwitserloot
  • 85,357
  • 5
  • 51
  • 72
  • 1. It's strange that OP says, till 11 it works fine(could SBT be using the same format but transforming before passing them to `javac`?). 2. any documents to support "Java also dropped..." statement? 3. Is this tested? – Naman Apr 30 '21 at 17:18