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     exports jdk.internal.foreign to
172         jdk.incubator.vector;
173     exports jdk.internal.event to
174         jdk.jfr;
175     exports jdk.internal.jimage to
176         jdk.jlink;
177     exports jdk.internal.jimage.decompressor to
178         jdk.jlink;
179     exports jdk.internal.loader to
180         java.instrument,
181         java.logging,
182         java.naming;
183     exports jdk.internal.jmod to
184         jdk.compiler,
185         jdk.jlink;
186     exports jdk.internal.logger to
187         java.logging;
188     exports jdk.internal.org.objectweb.asm to
189         jdk.jartool,
190         jdk.jfr,
191         jdk.jlink,
192         jdk.jshell;
193     exports jdk.internal.org.objectweb.asm.tree to
194         jdk.jfr,
195         jdk.jlink;
196     exports jdk.internal.org.objectweb.asm.util to
197         jdk.jfr;
198     exports jdk.internal.org.objectweb.asm.commons to
199         jdk.jfr;
200     exports jdk.internal.org.xml.sax to
201         jdk.jfr;
202     exports jdk.internal.org.xml.sax.helpers to
203         jdk.jfr;
204     exports jdk.internal.misc to
205         java.desktop,
206         java.logging,
207         java.management,
208         java.naming,
209         java.net.http,
210         java.rmi,
211         java.security.jgss,
212         jdk.attach,
213         jdk.charsets,
214         jdk.compiler,
215         jdk.crypto.cryptoki,
216         jdk.incubator.concurrent,
217         jdk.incubator.vector,
218         jdk.jfr,
219         jdk.jshell,
220         jdk.nio.mapmode,
221         jdk.unsupported,
222         jdk.internal.vm.ci;
223     exports jdk.internal.module to
224         java.instrument,
225         java.management.rmi,
226         jdk.jartool,
227         jdk.jfr,
228         jdk.jlink,
229         jdk.jpackage;
230     exports jdk.internal.perf to
231         java.management,
232         jdk.management.agent,
233         jdk.internal.jvmstat;
234     exports jdk.internal.platform to
235         jdk.management,
236         jdk.jfr;
237     exports jdk.internal.ref to
238         java.desktop,
239         java.net.http;
240     exports jdk.internal.reflect to
241         java.logging,
242         java.sql,
243         java.sql.rowset,
244         jdk.dynalink,
245         jdk.internal.vm.ci,
246         jdk.unsupported;
247     exports jdk.internal.vm to
248         java.management,
249         jdk.internal.jvmstat,
250         jdk.management,
251         jdk.management.agent;
252     exports jdk.internal.vm.annotation to
253         java.instrument,
254         jdk.internal.vm.ci,
255         jdk.incubator.vector,
256         jdk.jfr,
257         jdk.unsupported;
258     exports jdk.internal.vm.vector to
259         jdk.incubator.vector;
260     exports jdk.internal.util.jar to
261         jdk.jartool;
262     exports jdk.internal.util.xml to
263         jdk.jfr;
264     exports jdk.internal.util.xml.impl to
265         jdk.jfr;
266     exports jdk.internal.util.random to
267         jdk.random;
268     exports sun.net to
269         java.net.http,
270         jdk.naming.dns;
271     exports sun.net.ext to
272         jdk.net;
273     exports sun.net.dns to
274         java.security.jgss,
275         jdk.naming.dns;
276     exports sun.net.util to
277         java.desktop,
278         java.net.http,
279         jdk.jconsole,
280         jdk.sctp;
281     exports sun.net.www to
282         java.net.http,
283         jdk.jartool;
284     exports sun.net.www.protocol.http to
285         java.security.jgss;
286     exports sun.nio.ch to
287         java.management,
288         jdk.crypto.cryptoki,
289         jdk.net,
290         jdk.sctp;
291     exports sun.nio.cs to
292         jdk.charsets;
293     exports sun.nio.fs to
294         jdk.net;
295     exports sun.reflect.annotation to
296         jdk.compiler;
297     exports sun.reflect.generics.reflectiveObjects to
298         java.desktop;
299     exports sun.reflect.misc to
300         java.desktop,
301         java.datatransfer,
302         java.management,
303         java.management.rmi,
304         java.rmi,
305         java.sql.rowset;
306     exports sun.security.action to
307         java.desktop,
308         java.security.jgss,
309         jdk.crypto.ec;
310     exports sun.security.internal.interfaces to
311         jdk.crypto.cryptoki;
312     exports sun.security.internal.spec to
313         jdk.crypto.cryptoki;
314     exports sun.security.jca to
315         java.smartcardio,
316         jdk.crypto.ec,
317         jdk.crypto.cryptoki,
318         jdk.naming.dns;
319     exports sun.security.pkcs to
320         jdk.crypto.ec,
321         jdk.jartool;
322     exports sun.security.provider to
323         java.rmi,
324         java.security.jgss,
325         jdk.crypto.cryptoki,
326         jdk.crypto.ec,
327         jdk.security.auth;
328     exports sun.security.provider.certpath to
329         java.naming,
330         jdk.jartool;
331     exports sun.security.rsa to
332         jdk.crypto.cryptoki;
333     exports sun.security.timestamp to
334         jdk.jartool;
335     exports sun.security.tools to
336         jdk.jartool;
337     exports sun.security.util to
338         java.desktop,
339         java.naming,
340         java.rmi,
341         java.security.jgss,
342         java.security.sasl,
343         java.smartcardio,
344         java.xml.crypto,
345         jdk.crypto.ec,
346         jdk.crypto.cryptoki,
347         jdk.jartool,
348         jdk.security.auth,
349         jdk.security.jgss;
350     exports sun.security.util.math to
351         jdk.crypto.ec;
352     exports sun.security.util.math.intpoly to
353         jdk.crypto.ec;
354     exports sun.security.x509 to
355         jdk.crypto.ec,
356         jdk.crypto.cryptoki,
357         jdk.jartool;
358     exports sun.security.validator to
359         jdk.jartool;
360     exports sun.util.cldr to
361         jdk.jlink;
362     exports sun.util.locale.provider to
363         java.desktop,
364         jdk.jlink,
365         jdk.localedata;
366     exports sun.util.logging to
367         java.desktop,
368         java.logging,
369         java.prefs;
370     exports sun.util.resources to
371         jdk.localedata;
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 }