You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Ant project, NetBeans is still using obsolete "-source XX" and "-target XX" java compiler parameters. It does not guarantee the compatibility with the target version, because it does not use proper system modules for compilation. The --release XX parameter should be used instead. The compiler warning is clear.
warning: [options] location of system modules is not set in conjunction with -source 11
not setting the location of system modules may lead to class files that cannot run on JDK 11
--release 11 is recommended instead of -source 11 -target 11 because it sets the location of system modules automatically
Use case/motivation
The "--release" parameter cannot be used in Additional compiler option, because it collides with -target and -source parameters.
error: option --source cannot be used together with --release
error: option --target cannot be used together with --release
Usage: javac
use --help for a list of possible options
Description
In Ant project, NetBeans is still using obsolete "-source XX" and "-target XX" java compiler parameters. It does not guarantee the compatibility with the target version, because it does not use proper system modules for compilation. The --release XX parameter should be used instead. The compiler warning is clear.
warning: [options] location of system modules is not set in conjunction with -source 11
not setting the location of system modules may lead to class files that cannot run on JDK 11
--release 11 is recommended instead of -source 11 -target 11 because it sets the location of system modules automatically
Use case/motivation
The "--release" parameter cannot be used in Additional compiler option, because it collides with -target and -source parameters.
error: option --source cannot be used together with --release
error: option --target cannot be used together with --release
Usage: javac
use --help for a list of possible options
Related issues
No response
Are you willing to submit a pull request?
No