Java platform imports not limited to declared dependencies

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Feb 9 17:53:10 PST 2012


Jesse,

javac makes no claim right now to enforce rules of accessibility and 
visibility, since the details are still being worked out.

-- Jon

On 02/09/2012 05:28 PM, Jesse Glick wrote:
> As of my build of Jan 27, given
>
> ---%<--- src/org/hello/Main.java
> package org.hello;
> public class Main {
>     public static void main(String[] args) {
>         
> System.out.println(javax.xml.parsers.SAXParserFactory.newInstance());
>     }
> }
> ---%<--- src/module-info.java
> module org.hello @ 1 {
>     requires jdk.base;
>     class org.hello.Main;
> }
> ---%<---
>
> if I run
>
> $ mkdir classes && javac -d classes src/org/hello/Main.java 
> src/module-info.java
>
> it succeeds without complaint. My understanding was that this should 
> be rejected unless I also said "requires jdk.jaxp;". Am I missing 
> something?




More information about the jigsaw-dev mailing list