Re: Q: javac -source and -target version

Emmanuel Bourg <[email protected]>
Newsgroups gmane.linux.debian.devel.java
Message-ID <[email protected]>
Le 04/10/2023 à 13:36, Hideki Yamane a écrit :

>   Well, is there any text / document to use which version should be
>   used for -source and -target version, or is just dropping those options
>   allowed?

For Java 17 the minimum was 7, and with Java 21 the minimum is 8. For 
packages using ant, Maven or Gradle the level is adjusted automatically. 
You can drop the language level, but the package will require the same 
version or higher at runtime.

We should probably provide the minimum language level supported as a 
variable in the /usr/share/java/java_defaults.mk file from java-common.

Emmanuel Bourg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.