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