1 /*
  2  * Copyright (c) 2014, 2022, 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#getFileSystem
 37  *      FileSystems.getFileSystem(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.foreign;
 84     exports java.lang.invoke;
 85     exports java.lang.module;
 86     exports java.lang.ref;
 87     exports java.lang.reflect;
 88     exports java.lang.runtime;
 89     exports java.math;
 90     exports java.net;
 91     exports java.net.spi;
 92     exports java.nio;
 93     exports java.nio.channels;
 94     exports java.nio.channels.spi;
 95     exports java.nio.charset;
 96     exports java.nio.charset.spi;
 97     exports java.nio.file;
 98     exports java.nio.file.attribute;
 99     exports java.nio.file.spi;
100     exports java.security;
101     exports java.security.cert;
102     exports java.security.interfaces;
103     exports java.security.spec;
104     exports java.text;
105     exports java.text.spi;
106     exports java.time;
107     exports java.time.chrono;
108     exports java.time.format;
109     exports java.time.temporal;
110     exports java.time.zone;
111     exports java.util;
112     exports java.util.concurrent;
113     exports java.util.concurrent.atomic;
114     exports java.util.concurrent.locks;
115     exports java.util.function;
116     exports java.util.jar;
117     exports java.util.random;
118     exports java.util.regex;
119     exports java.util.spi;
120     exports java.util.stream;
121     exports java.util.zip;
122     exports javax.crypto;
123     exports javax.crypto.interfaces;
124     exports javax.crypto.spec;
125     exports javax.net;
126     exports javax.net.ssl;
127     exports javax.security.auth;
128     exports javax.security.auth.callback;
129     exports javax.security.auth.login;
130     exports javax.security.auth.spi;
131     exports javax.security.auth.x500;
132     exports javax.security.cert;
133 
134 
135     // additional qualified exports may be inserted at build time
136     // see make/gensrc/GenModuleInfo.gmk
137 
138     exports com.sun.crypto.provider to
139         jdk.crypto.cryptoki;
140     exports sun.invoke.util to
141         jdk.compiler;
142     exports com.sun.security.ntlm to
143         java.security.sasl;
144     // Note: all modules in the exported list participate in preview  features
145     // and therefore if they use preview features they do not need to be
146     // compiled with "--enable-preview".
147     // It is recommended for any modules that do participate that their
148     // module declaration be annotated with jdk.internal.javac.ParticipatesInPreview
149     exports jdk.internal.javac to
150         java.compiler,
151         java.management, // participates in preview features
152         jdk.compiler,
153         jdk.incubator.concurrent, // participates in preview features
154         jdk.incubator.vector, // participates in preview features
155         jdk.jdi,
156         jdk.jfr,
157         jdk.jshell,
158         jdk.management;
159     exports jdk.internal.access to
160         java.desktop,
161         java.logging,
162         java.management,
163         java.naming,
164         java.rmi,
165         jdk.charsets,
166         jdk.jartool,
167         jdk.jlink,
168         jdk.jfr,
169         jdk.net,
170         jdk.incubator.concurrent,
171         jdk.sctp,
172         jdk.crypto.cryptoki;
173     exports jdk.internal.foreign to
174         jdk.incubator.vector;
175     exports jdk.internal.event to
176         jdk.jfr;
177     exports jdk.internal.io to
178         jdk.internal.le,
179         jdk.jshell;
180     exports jdk.internal.jimage to
181         jdk.jlink;
182     exports jdk.internal.jimage.decompressor to
183         jdk.jlink;
184     exports jdk.internal.loader to
185         java.instrument,
186         java.logging,
187         java.naming;
188     exports jdk.internal.jmod to
189         jdk.compiler,
190         jdk.jlink;
191     exports jdk.internal.logger to
192         java.logging;
193     exports jdk.internal.org.objectweb.asm to
194         jdk.jartool,
195         jdk.jfr,
196         jdk.jlink,
197         jdk.jshell;
198     exports jdk.internal.org.objectweb.asm.tree to
199         jdk.jfr,
200         jdk.jlink;
201     exports jdk.internal.org.objectweb.asm.util to
202         jdk.jfr;
203     exports jdk.internal.org.objectweb.asm.commons to
204         jdk.jfr;
205     exports jdk.internal.org.xml.sax to
206         jdk.jfr;
207     exports jdk.internal.org.xml.sax.helpers to
208         jdk.jfr;
209     exports jdk.internal.misc to
210         java.desktop,
211         java.logging,
212         java.management,
213         java.naming,
214         java.net.http,
215         java.rmi,
216         java.security.jgss,
217         jdk.attach,
218         jdk.charsets,
219         jdk.compiler,
220         jdk.crypto.cryptoki,
221         jdk.incubator.concurrent,
222         jdk.incubator.vector,
223         jdk.jfr,
224         jdk.jshell,
225         jdk.nio.mapmode,
226         jdk.unsupported,
227         jdk.internal.vm.ci;
228     exports jdk.internal.module to
229         java.instrument,
230         java.management.rmi,
231         jdk.jartool,
232         jdk.jfr,
233         jdk.jlink,
234         jdk.jpackage;
235     exports jdk.internal.perf to
236         java.management,
237         jdk.management.agent,
238         jdk.internal.jvmstat;
239     exports jdk.internal.platform to
240         jdk.management,
241         jdk.jfr;
242     exports jdk.internal.ref to
243         java.desktop,
244         java.net.http;
245     exports jdk.internal.reflect to
246         java.logging,
247         java.sql,
248         java.sql.rowset,
249         jdk.dynalink,
250         jdk.internal.vm.ci,
251         jdk.unsupported;
252     exports jdk.internal.vm to
253         java.management,
254         jdk.incubator.concurrent,
255         jdk.internal.jvmstat,
256         jdk.management,
257         jdk.management.agent;
258     exports jdk.internal.vm.annotation to
259         java.instrument,
260         jdk.internal.vm.ci,
261         jdk.incubator.concurrent,
262         jdk.incubator.vector,
263         jdk.jfr,
264         jdk.unsupported;
265     exports jdk.internal.vm.vector to
266         jdk.incubator.vector;
267     exports jdk.internal.util.jar to
268         jdk.jartool;
269     exports jdk.internal.util.xml to
270         jdk.jfr;
271     exports jdk.internal.util.xml.impl to
272         jdk.jfr;
273     exports jdk.internal.util.random to
274         jdk.random;
275     exports jdk.internal.util to
276         java.desktop;
277     exports sun.net to
278         java.net.http,
279         jdk.naming.dns;
280     exports sun.net.ext to
281         jdk.net;
282     exports sun.net.dns to
283         java.security.jgss,
284         jdk.naming.dns;
285     exports sun.net.util to
286         java.desktop,
287         java.net.http,
288         jdk.jconsole,
289         jdk.sctp;
290     exports sun.net.www to
291         java.net.http,
292         jdk.jartool;
293     exports sun.net.www.protocol.http to
294         java.security.jgss;
295     exports sun.nio.ch to
296         java.management,
297         jdk.crypto.cryptoki,
298         jdk.net,
299         jdk.sctp;
300     exports sun.nio.cs to
301         jdk.charsets;
302     exports sun.nio.fs to
303         jdk.net;
304     exports sun.reflect.annotation to
305         jdk.compiler;
306     exports sun.reflect.generics.reflectiveObjects to
307         java.desktop;
308     exports sun.reflect.misc to
309         java.desktop,
310         java.datatransfer,
311         java.management,
312         java.management.rmi,
313         java.rmi,
314         java.sql.rowset;
315     exports sun.security.action to
316         java.desktop,
317         java.security.jgss,
318         jdk.crypto.ec,
319         jdk.incubator.concurrent;
320     exports sun.security.internal.interfaces to
321         jdk.crypto.cryptoki;
322     exports sun.security.internal.spec to
323         jdk.crypto.cryptoki;
324     exports sun.security.jca to
325         java.smartcardio,
326         jdk.crypto.ec,
327         jdk.crypto.cryptoki,
328         jdk.naming.dns;
329     exports sun.security.pkcs to
330         jdk.crypto.ec,
331         jdk.jartool;
332     exports sun.security.provider to
333         java.rmi,
334         java.security.jgss,
335         jdk.crypto.cryptoki,
336         jdk.crypto.ec,
337         jdk.security.auth;
338     exports sun.security.provider.certpath to
339         java.naming,
340         jdk.jartool;
341     exports sun.security.rsa to
342         jdk.crypto.cryptoki;
343     exports sun.security.timestamp to
344         jdk.jartool;
345     exports sun.security.tools to
346         jdk.jartool;
347     exports sun.security.util to
348         java.desktop,
349         java.naming,
350         java.rmi,
351         java.security.jgss,
352         java.security.sasl,
353         java.smartcardio,
354         java.xml.crypto,
355         jdk.crypto.ec,
356         jdk.crypto.cryptoki,
357         jdk.jartool,
358         jdk.security.auth,
359         jdk.security.jgss;
360     exports sun.security.util.math to
361         jdk.crypto.ec;
362     exports sun.security.util.math.intpoly to
363         jdk.crypto.ec;
364     exports sun.security.x509 to
365         jdk.crypto.ec,
366         jdk.crypto.cryptoki,
367         jdk.jartool;
368     exports sun.security.validator to
369         jdk.jartool;
370     exports sun.util.cldr to
371         jdk.jlink;
372     exports sun.util.locale.provider to
373         java.desktop,
374         jdk.jlink,
375         jdk.localedata;
376     exports sun.util.logging to
377         java.desktop,
378         java.logging,
379         java.prefs;
380     exports sun.util.resources to
381         jdk.localedata;
382 
383     // the service types defined by the APIs in this module
384 
385     uses java.lang.System.LoggerFinder;
386     uses java.net.ContentHandlerFactory;
387     uses java.net.spi.InetAddressResolverProvider;
388     uses java.net.spi.URLStreamHandlerProvider;
389     uses java.nio.channels.spi.AsynchronousChannelProvider;
390     uses java.nio.channels.spi.SelectorProvider;
391     uses java.nio.charset.spi.CharsetProvider;
392     uses java.nio.file.spi.FileSystemProvider;
393     uses java.nio.file.spi.FileTypeDetector;
394     uses java.security.Provider;
395     uses java.text.spi.BreakIteratorProvider;
396     uses java.text.spi.CollatorProvider;
397     uses java.text.spi.DateFormatProvider;
398     uses java.text.spi.DateFormatSymbolsProvider;
399     uses java.text.spi.DecimalFormatSymbolsProvider;
400     uses java.text.spi.NumberFormatProvider;
401     uses java.time.chrono.AbstractChronology;
402     uses java.time.chrono.Chronology;
403     uses java.time.zone.ZoneRulesProvider;
404     uses java.util.random.RandomGenerator;
405     uses java.util.spi.CalendarDataProvider;
406     uses java.util.spi.CalendarNameProvider;
407     uses java.util.spi.CurrencyNameProvider;
408     uses java.util.spi.LocaleNameProvider;
409     uses java.util.spi.ResourceBundleControlProvider;
410     uses java.util.spi.ResourceBundleProvider;
411     uses java.util.spi.TimeZoneNameProvider;
412     uses java.util.spi.ToolProvider;
413     uses javax.security.auth.spi.LoginModule;
414 
415     // JDK-internal service types
416 
417     uses jdk.internal.io.JdkConsoleProvider;
418     uses jdk.internal.logger.DefaultLoggerFinder;
419     uses sun.text.spi.JavaTimeDateTimePatternProvider;
420     uses sun.util.spi.CalendarProvider;
421     uses sun.util.locale.provider.LocaleDataMetaInfo;
422     uses sun.util.resources.LocaleData.CommonResourceBundleProvider;
423     uses sun.util.resources.LocaleData.SupplementaryResourceBundleProvider;
424 
425     // Built-in service providers that are located via ServiceLoader
426 
427     provides java.nio.file.spi.FileSystemProvider with
428         jdk.internal.jrtfs.JrtFileSystemProvider;
429 
430     provides java.util.random.RandomGenerator with
431         java.security.SecureRandom,
432         java.util.Random,
433         java.util.SplittableRandom;
434 
435 }