This is javac's restriction. By default, javac does not read classes from rt.jar. It reads from a symbol file, which only contains standard API and some internal API (e.g. com.sun., com.oracle. and sun.*).
To disable this mechanism, I can use javac -XDignore.symbol.file=true
option.
For Maven, edit POM file like the following.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-XDignore.symbol.file</compilerArgument>
</configuration>
</plugin>
Now, I can build project without error, but Error notification remains on NetBeans editor UI. To remove these error, I append -J-DCachingArchiveProvider.disableCtSym
option in NETBEANS_HOME/etc/netbeans.conf file.
netbeans_default_options="... -J-DCachingArchiveProvider.disableCtSym=true"
Finally, I removed all error from NetBeans environment.