Confusing javac error message

Sander Mak sander.mak at
Mon May 8 13:25:41 UTC 2017

When invoking javac (build 9-ea+168-jigsaw-nightly-h6355-20170504) with `--add-exports`, I meant to export sun.util but accidentally typed sun.misc: `javac --add-exports java.base/sun.misc=ALL-UNNAMED <sources>`.

This produced the following, mildly confusing error:

> error: module  reads package sun.misc from both jdk.unsupported and java.base

First of all, it seems like the phrase 'unnamed' is missing from this error. Furthermore, there's no sun.misc package in java.base (would be nice to get an error pointing that out), so how can we read the package from two modules?


More information about the jigsaw-dev mailing list