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