The compiler can not detect dead code because it can be a library.
jlink can detect dead code and provide a list of unneeded modules because it 
has the view of the whole application. 


On October 17, 2016 10:45:26 AM GMT+02:00, Andrew Haley <> wrote:
>On 16/10/16 19:52, Robert Scholte wrote:
>> To enforce the discipline, the java compiler should IMHO at least
>> check if all required modules are indeed required and if the
>> transitive required modules are indeed transitive.
>How can the compiler possibly know this?  There are ways of requiring
>a module without naming it in a declaration.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

Reply via email to