Can't use -release:8 with JDK8: 8 is not a valid choice for -release
See original GitHub issueCompiler version
3.1.0
Minimized code
Bash script showing issue with scalac
~ % java -version
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.302-b08, mixed mode)
~ % scalac -version
Scala compiler version 3.1.0 -- Copyright 2002-2021, LAMP/EPFL
~ % scalac -release:8 -help
8 is not a valid choice for -release
scalac -help gives more information
Output
8 is not a valid choice for -release
Expectation
Should accept the setting as this one should be safe to use.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
'jvm-1.8' is not a valid choice for '-target' - java - Stack Overflow
I'm using Scala 2.10, JVM 1.8, source compatibility 1.7. ... language level and source compatibility may be set to version 8 by default....
Read more >Toolchains + java 8 + scala 2.10 can pass wrong target ...
Expected Behavior Specifying JDK 8 in the java toolchain, ... 'jvm-1.8' is not a valid choice for '-target' bad option: '-target:jvm-1.8' ...
Read more >Compatibility Guide for JDK 8 - Oracle
This document discusses types of potential incompatibilities relating to the JDK 8 release of the Java platform.
Read more >7 Migrating From JDK 8 to Later JDK Releases
When your application is running successfully on the latest version of JDK, review Next Steps, which will help you avoid problems with future...
Read more >Migrating From JDK 8 to Later JDK ... - Oracle Help Center
When your application is running successfully on the latest version of JDK, review Next Steps, which will help you avoid problems with future...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As mentioned in the linked zio PR, there’s
-Xtarget 8
which is direct replacement for older-target:jvm-1.8
Right but we should encourage people to use -release instead since it ensures you don’t use new jdk APIs (that’s why we renamed target to Xtarget)