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