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