Allow java to be installed by other modules

There are modules which do the java installation separately. Also some organisations like us define all packages in a custom module as a virtual resource.