module-info platform dependencies

Mark Reinhold mr at sun.com
Fri May 15 09:14:56 PDT 2009


> Date: Fri, 15 May 2009 08:52:49 -0700
> From: jonathan.gibbons at sun.com

> So can you give me a method that maps a target number into an
> equivalent version query, or do I hard-code ("jdk@>=" + targetValue)
> into the compiler?

The former, of course.  How about this:

    public class org.openjdk.jigsaw.Platform {
        public static boolean isPlatformModuleName(String mn);
        public static ModuleIdQuery defaultPlatformModule(int target);
    }

> "jdk" seems like the wrong name to use eventually.  If you're writing
> it into the module-class file, we don't want to constrain apps to run
> on a large platform.  But, it'll do for now.

Actually, "jdk" is the wrong name because it refers to an implementation
of the Java platform rather than the platform itself.  The default should
really be "java@>=7", but I haven't implemented the "provides" feature
yet, so we can't do that yet.

I do think that the default should be upon the whole platform.  That's
effectively what it is today.  If you want something smaller then you can
specify it, or maybe use a tool which can analyze your class dependences,
identify the smallest suitable platform module, and insert that into your
module-info source file.

- Mark



More information about the jigsaw-dev mailing list