Exporting a package with no Java sources

Alexander Udalov alexander.udalov at jetbrains.com
Mon Jul 3 11:57:15 UTC 2017


Hi Alan,

> 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).

Thanks, a dummy class certainly workarounds the problem of javac
reporting a compilation error here. However, I hope there's a better
way because it'd be a bit strange to force users to create a dummy
Java class in every exported package in pure X modules (replace X with
any JVM language that is not Java).

Moreover, as pointed by Jonathan in his answer, I failed to recognize
a larger problem initially, that it wouldn't be possible to refer to
non-Java classes from Java sources anyway. So what I'm really looking
for instead, is the way to "augment" the module currently compiled by
javac with a directory containing class files, emitted by another
compiler.

Still, this workaround could prove helpful for example if there are
not many exported packages in a module (which I assume would be true
for many modules out there), and there are no Java sources in that
module.

Thanks!

Alexander


More information about the jigsaw-dev mailing list