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