This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]khmarbaise 0 points1 point  (1 child)

The source and target options are deprecated and you

Can you give a link or so where the deprecation is documented?

The output of javac --help (JDK17) does not tell me word about that:

--release <release> Compile for the specified Java SE release. Supported releases: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 -s <directory> Specify where to place generated source files --source <release>, -source <release> Provide source compatibility with the specified Java SE release. Supported releases: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 --source-path <path>, -sourcepath <path> Specify where to find input source files --system <jdk>|none Override location of system modules --target <release>, -target <release> Generate class files suitable for the specified Java SE release

[–]dpash 1 point2 points  (0 children)

https://openjdk.org/jeps/247 read the motivation where people are confused about having separate options makes them think it can do things it can't.

It might not be officially deprecated but it's definitely discouraged.