Exporting a package with no Java sources

Jonathan Gibbons jonathan.gibbons at oracle.com
Sat Jul 1 20:53:21 UTC 2017


Right now, javac only looks in one location (i.e. directory + its 
subdirectories) for the compiled classes for a module.

It is too late to change this for JDK 9, and even if we could, I think 
we are already pushing the limits of what can be specified on the 
command line to configure the different paths for all the modules 
involved in the compilation.

Converting the error to a warning (as was suggested in the original post 
in this thread) would not address the case where the Java source code 
needs to refer to types declared in class files generated from non-Java 
sources.

-- Jon


On 7/1/17 3:08 AM, Alan Bateman wrote:
> On 01/07/2017 10:09, Peter Levart wrote:
>> Hi Alexander,
>>
>> Have you tried to put a package-info.java into the exported package? It
>> might work.
>>
> I don't think so, but a dummy class/interface will do (it doesn't have 
> to be public). There is a lengthy discussion on this topic in JIRA 
> from 2016 that would be useful to link to (but I can't find it just 
> now because JIRA is down for maintenance).
>
> -Alan



More information about the jigsaw-dev mailing list