Re: Q: javac -source and -target version

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

>> We should probably provide the minimum language level supported as a
>> variable in the /usr/share/java/java_defaults.mk file from java-common.
> 
>   Nice, each Java packages do not need to care about which level
>   should use and drop it safely, then?
  

I've just uploaded java-common/0.75 with a new java_compat_level
variable if you want to give it a try:

   #!/usr/bin/make -f
   
   include /usr/share/java/java_defaults.mk
   
   build:
       javac -source $(java_compat_level) -target $(java_compat_level) ...


It's preferable to keep using the -source/-target options rather than
removing them, it extends the lower bound of the Java versions range
usable with the package.

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.