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