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     // Note: all modules in the exported list participate in preview  features
145     // and therefore if they use preview features they do not need to be
146     // compiled with "--enable-preview".
147     // It is recommended for any modules that do participate that their
148     // module declaration be annotated with jdk.internal.javac.ParticipatesInPreview
149     exports jdk.internal.javac to
150         java.compiler,
151         java.management, // participates in preview features
152         jdk.compiler,
153         jdk.incubator.concurrent, // participates in preview features
154         jdk.incubator.vector, // participates in preview features
155         jdk.jdi,
156         jdk.jfr,
157         jdk.jshell,
158         jdk.management;
159     exports jdk.internal.access to
160         java.desktop,
161         java.logging,
162         java.management,
163         java.naming,
164         java.rmi,
165         jdk.charsets,
166         jdk.jartool,
167         jdk.jlink,
168         jdk.net;
169     exports jdk.internal.foreign to
170         jdk.incubator.vector;
171     exports jdk.internal.event to
172         jdk.jfr;
173     exports jdk.internal.jimage to
174         jdk.jlink;
175     exports jdk.internal.jimage.decompressor to
176         jdk.jlink;
177     exports jdk.internal.loader to
178         java.instrument,
179         java.logging,
180         java.naming;
181     exports jdk.internal.jmod to
182         jdk.compiler,
183         jdk.jlink;
184     exports jdk.internal.logger to
185         java.logging;
186     exports jdk.internal.org.objectweb.asm to
187         jdk.jartool,
188         jdk.jfr,
189         jdk.jlink;
190     exports jdk.internal.org.objectweb.asm.tree to
191         jdk.jfr,
192         jdk.jlink;
193     exports jdk.internal.org.objectweb.asm.util to
194         jdk.jfr;
195     exports jdk.internal.org.objectweb.asm.commons to
196         jdk.jfr;
197     exports jdk.internal.org.xml.sax to
198         jdk.jfr;
199     exports jdk.internal.org.xml.sax.helpers to
200         jdk.jfr;
201     exports jdk.internal.misc to
202         java.desktop,
203         java.logging,
204         java.management,
205         java.naming,
206         java.net.http,
207         java.rmi,
208         java.security.jgss,
209         jdk.attach,
210         jdk.charsets,
211         jdk.compiler,
212         jdk.crypto.cryptoki,
213         jdk.incubator.concurrent,
214         jdk.incubator.vector,
215         jdk.jfr,
216         jdk.jshell,
217         jdk.nio.mapmode,
218         jdk.unsupported,
219         jdk.internal.vm.ci;
220     exports jdk.internal.module to
221         java.instrument,
222         java.management.rmi,
223         jdk.jartool,
224         jdk.jfr,
225         jdk.jlink,
226         jdk.jpackage;
227     exports jdk.internal.perf to
228         java.management,
229         jdk.management.agent,
230         jdk.internal.jvmstat;
231     exports jdk.internal.platform to
232         jdk.management,
233         jdk.jfr;
234     exports jdk.internal.ref to
235         java.desktop,
236         java.net.http;
237     exports jdk.internal.reflect to
238         java.logging,
239         java.sql,
240         java.sql.rowset,
241         jdk.dynalink,
242         jdk.internal.vm.ci,
243         jdk.unsupported;
244     exports jdk.internal.vm to
245         java.management,
246         jdk.internal.jvmstat,
247         jdk.management,
248         jdk.management.agent;
249     exports jdk.internal.vm.annotation to
250         java.instrument,
251         jdk.internal.vm.ci,
252         jdk.incubator.vector,
253         jdk.jfr,
254         jdk.unsupported;
255     exports jdk.internal.vm.vector to
256         jdk.incubator.vector;
257     exports jdk.internal.util.jar to
258         jdk.jartool;
259     exports jdk.internal.util.xml to
260         jdk.jfr;
261     exports jdk.internal.util.xml.impl to
262         jdk.jfr;
263     exports jdk.internal.util.random to
264         jdk.random;
265     exports sun.net to
266         java.net.http,
267         jdk.naming.dns;
268     exports sun.net.ext to
269         jdk.net;
270     exports sun.net.dns to
271         java.security.jgss,
272         jdk.naming.dns;
273     exports sun.net.util to
274         java.desktop,
275         java.net.http,
276         jdk.jconsole,
277         jdk.sctp;
278     exports sun.net.www to
279         java.net.http,
280         jdk.jartool;
281     exports sun.net.www.protocol.http to
282         java.security.jgss;
283     exports sun.nio.ch to
284         java.management,
285         jdk.crypto.cryptoki,
286         jdk.net,
287         jdk.sctp;
288     exports sun.nio.cs to
289         jdk.charsets;
290     exports sun.nio.fs to
291         jdk.net;
292     exports sun.reflect.annotation to
293         jdk.compiler;
294     exports sun.reflect.generics.reflectiveObjects to
295         java.desktop;
296     exports sun.reflect.misc to
297         java.desktop,
298         java.datatransfer,
299         java.management,
300         java.management.rmi,
301         java.rmi,
302         java.sql.rowset;
303     exports sun.security.action to
304         java.desktop,
305         java.security.jgss,
306         jdk.crypto.ec;
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 
370     // the service types defined by the APIs in this module
371 
372     uses java.lang.System.LoggerFinder;
373     uses java.net.ContentHandlerFactory;
374     uses java.net.spi.InetAddressResolverProvider;
375     uses java.net.spi.URLStreamHandlerProvider;
376     uses java.nio.channels.spi.AsynchronousChannelProvider;
377     uses java.nio.channels.spi.SelectorProvider;
378     uses java.nio.charset.spi.CharsetProvider;
379     uses java.nio.file.spi.FileSystemProvider;
380     uses java.nio.file.spi.FileTypeDetector;
381     uses java.security.Provider;
382     uses java.text.spi.BreakIteratorProvider;
383     uses java.text.spi.CollatorProvider;
384     uses java.text.spi.DateFormatProvider;
385     uses java.text.spi.DateFormatSymbolsProvider;
386     uses java.text.spi.DecimalFormatSymbolsProvider;
387     uses java.text.spi.NumberFormatProvider;
388     uses java.time.chrono.AbstractChronology;
389     uses java.time.chrono.Chronology;
390     uses java.time.zone.ZoneRulesProvider;
391     uses java.util.random.RandomGenerator;
392     uses java.util.spi.CalendarDataProvider;
393     uses java.util.spi.CalendarNameProvider;
394     uses java.util.spi.CurrencyNameProvider;
395     uses java.util.spi.LocaleNameProvider;
396     uses java.util.spi.ResourceBundleControlProvider;
397     uses java.util.spi.ResourceBundleProvider;
398     uses java.util.spi.TimeZoneNameProvider;
399     uses java.util.spi.ToolProvider;
400     uses javax.security.auth.spi.LoginModule;
401 
402     // JDK-internal service types
403 
404     uses jdk.internal.logger.DefaultLoggerFinder;
405     uses sun.text.spi.JavaTimeDateTimePatternProvider;
406     uses sun.util.spi.CalendarProvider;
407     uses sun.util.locale.provider.LocaleDataMetaInfo;
408     uses sun.util.resources.LocaleData.CommonResourceBundleProvider;
409     uses sun.util.resources.LocaleData.SupplementaryResourceBundleProvider;
410 
411     // Built-in service providers that are located via ServiceLoader
412 
413     provides java.nio.file.spi.FileSystemProvider with
414         jdk.internal.jrtfs.JrtFileSystemProvider;
415 
416     provides java.util.random.RandomGenerator with
417         java.security.SecureRandom,
418         java.util.Random,
419         java.util.SplittableRandom;
420 
421 }