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         jdk.incubator.jextract;
181     exports jdk.internal.org.objectweb.asm.tree to
182         jdk.jfr,
183         jdk.jlink;
184     exports jdk.internal.org.objectweb.asm.util to
185         jdk.jfr;
186     exports jdk.internal.org.objectweb.asm.commons to
187         jdk.jfr;
188     exports jdk.internal.org.xml.sax to
189         jdk.jfr;
190     exports jdk.internal.org.xml.sax.helpers to
191         jdk.jfr;
192     exports jdk.internal.misc to
193         java.desktop,
194         java.logging,
195         java.management,
196         java.naming,
197         java.net.http,
198         java.rmi,
199         java.security.jgss,
200         jdk.attach,
201         jdk.charsets,
202         jdk.compiler,
203         jdk.crypto.cryptoki,
204         jdk.incubator.vector,
205         jdk.jfr,
206         jdk.jshell,
207         jdk.nio.mapmode,
208         jdk.unsupported,
209         jdk.internal.vm.ci,
210         jdk.incubator.foreign;
211     exports jdk.internal.module to
212         java.instrument,
213         java.management.rmi,
214         jdk.jartool,
215         jdk.jfr,
216         jdk.jlink,
217         jdk.jpackage,
218         jdk.incubator.foreign;
219     exports jdk.internal.perf to
220         java.management,
221         jdk.management.agent,
222         jdk.internal.jvmstat;
223     exports jdk.internal.platform to
224         jdk.management,
225         jdk.jfr;
226     exports jdk.internal.ref to
227         java.desktop,
228         jdk.incubator.foreign;
229     exports jdk.internal.reflect to
230         java.logging,
231         java.sql,
232         java.sql.rowset,
233         jdk.dynalink,
234         jdk.internal.vm.ci,
235         jdk.unsupported,
236         jdk.incubator.foreign;
237     exports jdk.internal.vm to
238         jdk.internal.jvmstat,
239         jdk.management.agent;
240     exports jdk.internal.vm.annotation to
241         java.instrument,
242         jdk.internal.vm.ci,
243         jdk.incubator.vector,
244         jdk.incubator.foreign,
245         jdk.jfr,
246         jdk.unsupported;
247     exports jdk.internal.vm.vector to
248         jdk.incubator.vector;
249     exports jdk.internal.util to
250             jdk.incubator.foreign;
251     exports jdk.internal.util.jar to
252         jdk.jartool;
253     exports jdk.internal.util.xml to
254         jdk.jfr;
255     exports jdk.internal.util.xml.impl to
256         jdk.jfr;
257     exports jdk.internal.util.random to
258         jdk.random;
259     exports sun.net to
260         java.net.http,
261         jdk.naming.dns;
262     exports sun.net.ext to
263         jdk.net;
264     exports sun.net.dns to
265         java.security.jgss,
266         jdk.naming.dns;
267     exports sun.net.util to
268         java.desktop,
269         java.net.http,
270         jdk.jconsole,
271         jdk.sctp;
272     exports sun.net.www to
273         java.net.http,
274         jdk.jartool;
275     exports sun.net.www.protocol.http to
276         java.security.jgss;
277     exports sun.nio.ch to
278         java.management,
279         jdk.crypto.cryptoki,
280         jdk.net,
281         jdk.sctp,
282         jdk.incubator.foreign;
283     exports sun.nio.cs to
284         jdk.charsets;
285     exports sun.nio.fs to
286         jdk.net;
287     exports sun.reflect.annotation to
288         jdk.compiler;
289     exports sun.reflect.generics.reflectiveObjects to
290         java.desktop;
291     exports sun.reflect.misc to
292         java.desktop,
293         java.datatransfer,
294         java.management,
295         java.management.rmi,
296         java.rmi,
297         java.sql.rowset;
298     exports sun.security.action to
299         java.desktop,
300         java.security.jgss,
301         jdk.crypto.ec,
302         jdk.incubator.foreign;
303     exports sun.security.internal.interfaces to
304         jdk.crypto.cryptoki;
305     exports sun.security.internal.spec to
306         jdk.crypto.cryptoki;
307     exports sun.security.jca to
308         java.smartcardio,
309         jdk.crypto.ec,
310         jdk.crypto.cryptoki,
311         jdk.naming.dns;
312     exports sun.security.pkcs to
313         jdk.crypto.ec,
314         jdk.jartool;
315     exports sun.security.provider to
316         java.rmi,
317         java.security.jgss,
318         jdk.crypto.cryptoki,
319         jdk.crypto.ec,
320         jdk.security.auth;
321     exports sun.security.provider.certpath to
322         java.naming,
323         jdk.jartool;
324     exports sun.security.rsa to
325         jdk.crypto.cryptoki;
326     exports sun.security.timestamp to
327         jdk.jartool;
328     exports sun.security.tools to
329         jdk.jartool;
330     exports sun.security.util to
331         java.desktop,
332         java.naming,
333         java.rmi,
334         java.security.jgss,
335         java.security.sasl,
336         java.smartcardio,
337         java.xml.crypto,
338         jdk.crypto.ec,
339         jdk.crypto.cryptoki,
340         jdk.jartool,
341         jdk.security.auth,
342         jdk.security.jgss;
343     exports sun.security.util.math to
344         jdk.crypto.ec;
345     exports sun.security.util.math.intpoly to
346         jdk.crypto.ec;
347     exports sun.security.x509 to
348         jdk.crypto.ec,
349         jdk.crypto.cryptoki,
350         jdk.jartool;
351     exports sun.security.validator to
352         jdk.jartool;
353     exports sun.util.cldr to
354         jdk.jlink;
355     exports sun.util.locale.provider to
356         java.desktop,
357         jdk.jlink,
358         jdk.localedata;
359     exports sun.util.logging to
360         java.desktop,
361         java.logging,
362         java.prefs;
363     exports sun.util.resources to
364         jdk.localedata;
365     exports jdk.internal.invoke to
366         jdk.incubator.foreign;
367 
368     // the service types defined by the APIs in this module
369 
370     uses java.lang.System.LoggerFinder;
371     uses java.net.ContentHandlerFactory;
372     uses java.net.spi.URLStreamHandlerProvider;
373     uses java.nio.channels.spi.AsynchronousChannelProvider;
374     uses java.nio.channels.spi.SelectorProvider;
375     uses java.nio.charset.spi.CharsetProvider;
376     uses java.nio.file.spi.FileSystemProvider;
377     uses java.nio.file.spi.FileTypeDetector;
378     uses java.security.Provider;
379     uses java.text.spi.BreakIteratorProvider;
380     uses java.text.spi.CollatorProvider;
381     uses java.text.spi.DateFormatProvider;
382     uses java.text.spi.DateFormatSymbolsProvider;
383     uses java.text.spi.DecimalFormatSymbolsProvider;
384     uses java.text.spi.NumberFormatProvider;
385     uses java.time.chrono.AbstractChronology;
386     uses java.time.chrono.Chronology;
387     uses java.time.zone.ZoneRulesProvider;
388     uses java.util.random.RandomGenerator;
389     uses java.util.spi.CalendarDataProvider;
390     uses java.util.spi.CalendarNameProvider;
391     uses java.util.spi.CurrencyNameProvider;
392     uses java.util.spi.LocaleNameProvider;
393     uses java.util.spi.ResourceBundleControlProvider;
394     uses java.util.spi.ResourceBundleProvider;
395     uses java.util.spi.TimeZoneNameProvider;
396     uses java.util.spi.ToolProvider;
397     uses javax.security.auth.spi.LoginModule;
398 
399     // JDK-internal service types
400 
401     uses jdk.internal.logger.DefaultLoggerFinder;
402     uses sun.text.spi.JavaTimeDateTimePatternProvider;
403     uses sun.util.spi.CalendarProvider;
404     uses sun.util.locale.provider.LocaleDataMetaInfo;
405     uses sun.util.resources.LocaleData.CommonResourceBundleProvider;
406     uses sun.util.resources.LocaleData.SupplementaryResourceBundleProvider;
407 
408     // Built-in service providers that are located via ServiceLoader
409 
410     provides java.nio.file.spi.FileSystemProvider with
411         jdk.internal.jrtfs.JrtFileSystemProvider;
412 
413     provides java.util.random.RandomGenerator with
414         java.security.SecureRandom,
415         java.util.Random,
416         java.util.SplittableRandom;
417 
418 }