1 /*
  2  * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.  Oracle designates this
  8  * particular file as subject to the "Classpath" exception as provided
  9  * by Oracle in the LICENSE file that accompanied this code.
 10  *
 11  * This code is distributed in the hope that it will be useful, but WITHOUT
 12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14  * version 2 for more details (a copy is included in the LICENSE file that
 15  * accompanied this code).
 16  *
 17  * You should have received a copy of the GNU General Public License version
 18  * 2 along with this work; if not, write to the Free Software Foundation,
 19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20  *
 21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22  * or visit www.oracle.com if you need additional information or have any
 23  * questions.
 24  */
 25 
 26 /**
 27  * Defines the foundational APIs of the Java SE Platform.
 28  *
 29  * <dl class="notes">
 30  * <dt>Providers:</dt>
 31  * <dd> The JDK implementation of this module provides an implementation of
 32  *      the {@index jrt jrt} {@linkplain java.nio.file.spi.FileSystemProvider
 33  *      file system provider} to enumerate and read the class and resource
 34  *      files in a run-time image.
 35  *      The jrt file system can be created by calling
 36  *      {@link java.nio.file.FileSystems#newFileSystem
 37  *      FileSystems.newFileSystem(URI.create("jrt:/"))}.
 38  *      </dd>
 39  * </dl>
 40  *
 41  * @toolGuide java java launcher
 42  * @toolGuide keytool
 43  *
 44  * @provides java.nio.file.spi.FileSystemProvider
 45  *
 46  * @uses java.lang.System.LoggerFinder
 47  * @uses java.net.ContentHandlerFactory
 48  * @uses java.net.spi.URLStreamHandlerProvider
 49  * @uses java.nio.channels.spi.AsynchronousChannelProvider
 50  * @uses java.nio.channels.spi.SelectorProvider
 51  * @uses java.nio.charset.spi.CharsetProvider
 52  * @uses java.nio.file.spi.FileSystemProvider
 53  * @uses java.nio.file.spi.FileTypeDetector
 54  * @uses java.security.Provider
 55  * @uses java.text.spi.BreakIteratorProvider
 56  * @uses java.text.spi.CollatorProvider
 57  * @uses java.text.spi.DateFormatProvider
 58  * @uses java.text.spi.DateFormatSymbolsProvider
 59  * @uses java.text.spi.DecimalFormatSymbolsProvider
 60  * @uses java.text.spi.NumberFormatProvider
 61  * @uses java.time.chrono.AbstractChronology
 62  * @uses java.time.chrono.Chronology
 63  * @uses java.time.zone.ZoneRulesProvider
 64  * @uses java.util.spi.CalendarDataProvider
 65  * @uses java.util.spi.CalendarNameProvider
 66  * @uses java.util.spi.CurrencyNameProvider
 67  * @uses java.util.spi.LocaleNameProvider
 68  * @uses java.util.spi.ResourceBundleControlProvider
 69  * @uses java.util.spi.ResourceBundleProvider
 70  * @uses java.util.spi.TimeZoneNameProvider
 71  * @uses java.util.spi.ToolProvider
 72  * @uses javax.security.auth.spi.LoginModule
 73  *
 74  * @moduleGraph
 75  * @since 9
 76  */
 77 module java.base {
 78 
 79     exports java.io;
 80     exports java.lang;
 81     exports java.lang.annotation;
 82     exports java.lang.constant;
 83     exports java.lang.invoke;
 84     exports java.lang.module;
 85     exports java.lang.ref;
 86     exports java.lang.reflect;
 87     exports java.lang.runtime;
 88     exports java.math;
 89     exports java.net;
 90     exports java.net.spi;
 91     exports java.nio;
 92     exports java.nio.channels;
 93     exports java.nio.channels.spi;
 94     exports java.nio.charset;
 95     exports java.nio.charset.spi;
 96     exports java.nio.file;
 97     exports java.nio.file.attribute;
 98     exports java.nio.file.spi;
 99     exports java.security;
100     exports java.security.cert;
101     exports java.security.interfaces;
102     exports java.security.spec;
103     exports java.text;
104     exports java.text.spi;
105     exports java.time;
106     exports java.time.chrono;
107     exports java.time.format;
108     exports java.time.temporal;
109     exports java.time.zone;
110     exports java.util;
111     exports java.util.concurrent;
112     exports java.util.concurrent.atomic;
113     exports java.util.concurrent.locks;
114     exports java.util.function;
115     exports java.util.jar;
116     exports java.util.random;
117     exports java.util.regex;
118     exports java.util.spi;
119     exports java.util.stream;
120     exports java.util.zip;
121     exports javax.crypto;
122     exports javax.crypto.interfaces;
123     exports javax.crypto.spec;
124     exports javax.net;
125     exports javax.net.ssl;
126     exports javax.security.auth;
127     exports javax.security.auth.callback;
128     exports javax.security.auth.login;
129     exports javax.security.auth.spi;
130     exports javax.security.auth.x500;
131     exports javax.security.cert;
132 
133 
134     // additional qualified exports may be inserted at build time
135     // see make/gensrc/GenModuleInfo.gmk
136 
137     exports com.sun.crypto.provider to
138         jdk.crypto.cryptoki;
139     exports sun.invoke.util to
140         jdk.compiler,
141         jdk.incubator.foreign;
142     exports com.sun.security.ntlm to
143         java.security.sasl;
144     exports jdk.internal.javac to
145         java.compiler,
146         jdk.compiler,
147         jdk.jshell;
148     exports jdk.internal.access to
149         java.desktop,
150         java.logging,
151         java.management,
152         java.naming,
153         java.rmi,
154         jdk.jartool,
155         jdk.jlink,
156         jdk.net,
157         jdk.incubator.foreign;
158     exports jdk.internal.access.foreign to
159         jdk.incubator.foreign;
160     exports jdk.internal.event to
161         jdk.jfr;
162     exports jdk.internal.jimage to
163         jdk.jlink;
164     exports jdk.internal.jimage.decompressor to
165         jdk.jlink;
166     exports jdk.internal.loader to
167         java.instrument,
168         java.logging,
169         java.naming,
170         jdk.incubator.foreign;
171     exports jdk.internal.jmod to
172         jdk.compiler,
173         jdk.jlink;
174     exports jdk.internal.logger to
175         java.logging;
176     exports jdk.internal.org.objectweb.asm to
177         jdk.jartool,
178         jdk.jfr,
179         jdk.jlink;
180     exports jdk.internal.org.objectweb.asm.tree to
181         jdk.jfr,
182         jdk.jlink;
183     exports jdk.internal.org.objectweb.asm.util to
184         jdk.jfr;
185     exports jdk.internal.org.objectweb.asm.commons to
186         jdk.jfr;
187     exports jdk.internal.org.xml.sax to
188         jdk.jfr;
189     exports jdk.internal.org.xml.sax.helpers to
190         jdk.jfr;
191     exports jdk.internal.misc to
192         java.desktop,
193         java.logging,
194         java.management,
195         java.naming,
196         java.net.http,
197         java.rmi,
198         java.security.jgss,
199         jdk.attach,
200         jdk.charsets,
201         jdk.compiler,
202         jdk.crypto.cryptoki,
203         jdk.incubator.vector,
204         jdk.jfr,
205         jdk.jshell,
206         jdk.nio.mapmode,
207         jdk.unsupported,
208         jdk.internal.vm.ci,
209         jdk.incubator.foreign;
210     exports jdk.internal.module to
211         java.instrument,
212         java.management.rmi,
213         jdk.jartool,
214         jdk.jfr,
215         jdk.jlink,
216         jdk.jpackage,
217         jdk.incubator.foreign;
218     exports jdk.internal.perf to
219         java.management,
220         jdk.management.agent,
221         jdk.internal.jvmstat;
222     exports jdk.internal.platform to
223         jdk.management,
224         jdk.jfr;
225     exports jdk.internal.ref to
226         java.desktop,
227         jdk.incubator.foreign;
228     exports jdk.internal.reflect to
229         java.logging,
230         java.sql,
231         java.sql.rowset,
232         jdk.dynalink,
233         jdk.internal.vm.ci,
234         jdk.unsupported,
235         jdk.incubator.foreign;
236     exports jdk.internal.vm to
237         jdk.internal.jvmstat,
238         jdk.management.agent;
239     exports jdk.internal.vm.annotation to
240         java.instrument,
241         jdk.internal.vm.ci,
242         jdk.incubator.vector,
243         jdk.incubator.foreign,
244         jdk.jfr,
245         jdk.unsupported;
246     exports jdk.internal.vm.vector to
247         jdk.incubator.vector;
248     exports jdk.internal.util to
249             jdk.incubator.foreign;
250     exports jdk.internal.util.jar to
251         jdk.jartool;
252     exports jdk.internal.util.xml to
253         jdk.jfr;
254     exports jdk.internal.util.xml.impl to
255         jdk.jfr;
256     exports jdk.internal.util.random to
257         jdk.random;
258     exports sun.net to
259         java.net.http,
260         jdk.naming.dns;
261     exports sun.net.ext to
262         jdk.net;
263     exports sun.net.dns to
264         java.security.jgss,
265         jdk.naming.dns;
266     exports sun.net.util to
267         java.desktop,
268         java.net.http,
269         jdk.jconsole,
270         jdk.sctp;
271     exports sun.net.www to
272         java.net.http,
273         jdk.jartool;
274     exports sun.net.www.protocol.http to
275         java.security.jgss;
276     exports sun.nio.ch to
277         java.management,
278         jdk.crypto.cryptoki,
279         jdk.net,
280         jdk.sctp,
281         jdk.incubator.foreign;
282     exports sun.nio.cs to
283         jdk.charsets;
284     exports sun.nio.fs to
285         jdk.net;
286     exports sun.reflect.annotation to
287         jdk.compiler;
288     exports sun.reflect.generics.reflectiveObjects to
289         java.desktop;
290     exports sun.reflect.misc to
291         java.desktop,
292         java.datatransfer,
293         java.management,
294         java.management.rmi,
295         java.rmi,
296         java.sql.rowset;
297     exports sun.security.action to
298         java.desktop,
299         java.security.jgss,
300         jdk.crypto.ec,
301         jdk.incubator.foreign;
302     exports sun.security.internal.interfaces to
303         jdk.crypto.cryptoki;
304     exports sun.security.internal.spec to
305         jdk.crypto.cryptoki;
306     exports sun.security.jca to
307         java.smartcardio,
308         jdk.crypto.ec,
309         jdk.crypto.cryptoki,
310         jdk.naming.dns;
311     exports sun.security.pkcs to
312         jdk.crypto.ec,
313         jdk.jartool;
314     exports sun.security.provider to
315         java.rmi,
316         java.security.jgss,
317         jdk.crypto.cryptoki,
318         jdk.crypto.ec,
319         jdk.security.auth;
320     exports sun.security.provider.certpath to
321         java.naming,
322         jdk.jartool;
323     exports sun.security.rsa to
324         jdk.crypto.cryptoki;
325     exports sun.security.timestamp to
326         jdk.jartool;
327     exports sun.security.tools to
328         jdk.jartool;
329     exports sun.security.util to
330         java.desktop,
331         java.naming,
332         java.rmi,
333         java.security.jgss,
334         java.security.sasl,
335         java.smartcardio,
336         java.xml.crypto,
337         jdk.crypto.ec,
338         jdk.crypto.cryptoki,
339         jdk.jartool,
340         jdk.security.auth,
341         jdk.security.jgss;
342     exports sun.security.util.math to
343         jdk.crypto.ec;
344     exports sun.security.util.math.intpoly to
345         jdk.crypto.ec;
346     exports sun.security.x509 to
347         jdk.crypto.ec,
348         jdk.crypto.cryptoki,
349         jdk.jartool;
350     exports sun.security.validator to
351         jdk.jartool;
352     exports sun.util.cldr to
353         jdk.jlink;
354     exports sun.util.locale.provider to
355         java.desktop,
356         jdk.jlink,
357         jdk.localedata;
358     exports sun.util.logging to
359         java.desktop,
360         java.logging,
361         java.prefs;
362     exports sun.util.resources to
363         jdk.localedata;
364     exports jdk.internal.invoke to
365         jdk.incubator.foreign;
366 
367     // the service types defined by the APIs in this module
368 
369     uses java.lang.System.LoggerFinder;
370     uses java.net.ContentHandlerFactory;
371     uses java.net.spi.URLStreamHandlerProvider;
372     uses java.nio.channels.spi.AsynchronousChannelProvider;
373     uses java.nio.channels.spi.SelectorProvider;
374     uses java.nio.charset.spi.CharsetProvider;
375     uses java.nio.file.spi.FileSystemProvider;
376     uses java.nio.file.spi.FileTypeDetector;
377     uses java.security.Provider;
378     uses java.text.spi.BreakIteratorProvider;
379     uses java.text.spi.CollatorProvider;
380     uses java.text.spi.DateFormatProvider;
381     uses java.text.spi.DateFormatSymbolsProvider;
382     uses java.text.spi.DecimalFormatSymbolsProvider;
383     uses java.text.spi.NumberFormatProvider;
384     uses java.time.chrono.AbstractChronology;
385     uses java.time.chrono.Chronology;
386     uses java.time.zone.ZoneRulesProvider;
387     uses java.util.random.RandomGenerator;
388     uses java.util.spi.CalendarDataProvider;
389     uses java.util.spi.CalendarNameProvider;
390     uses java.util.spi.CurrencyNameProvider;
391     uses java.util.spi.LocaleNameProvider;
392     uses java.util.spi.ResourceBundleControlProvider;
393     uses java.util.spi.ResourceBundleProvider;
394     uses java.util.spi.TimeZoneNameProvider;
395     uses java.util.spi.ToolProvider;
396     uses javax.security.auth.spi.LoginModule;
397 
398     // JDK-internal service types
399 
400     uses jdk.internal.logger.DefaultLoggerFinder;
401     uses sun.text.spi.JavaTimeDateTimePatternProvider;
402     uses sun.util.spi.CalendarProvider;
403     uses sun.util.locale.provider.LocaleDataMetaInfo;
404     uses sun.util.resources.LocaleData.CommonResourceBundleProvider;
405     uses sun.util.resources.LocaleData.SupplementaryResourceBundleProvider;
406 
407     // Built-in service providers that are located via ServiceLoader
408 
409     provides java.nio.file.spi.FileSystemProvider with
410         jdk.internal.jrtfs.JrtFileSystemProvider;
411 
412     provides java.util.random.RandomGenerator with
413         java.security.SecureRandom,
414         java.util.Random,
415         java.util.SplittableRandom;
416 
417 }