FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 188 Ask New Question


On By


1 Answer


Following program prints all module names in Java9


public class PrintAllModules {
    public static void main(String[] args) {
        ModuleLayer.boot().modules().forEach((module) -> {
            System.out.println(module.getName());
        });
    }
}

Output:

java.sql
jdk.internal.le
java.smartcardio
java.management.rmi
jdk.packager.services
jdk.jstatd
java.base
jdk.management.agent
java.desktop
java.scripting
jdk.crypto.ec
java.security.jgss
java.jnlp
jdk.jlink
javafx.graphics
jdk.jdeps
jdk.editpad
jdk.jdi
java.datatransfer
jdk.compiler
jdk.internal.ed
jdk.management
javafx.fxml
javafx.controls
jdk.dynalink
java.naming
jdk.javadoc
jdk.localedata
java.rmi
jdk.jartool
jdk.unsupported
javafx.base
jdk.jdwp.agent
jdk.jsobject
jdk.charsets
jdk.management.cmm
java.sql.rowset
jdk.packager
java.prefs
java.management
jdk.jfr
jdk.management.resource
jdk.plugin.dom
jdk.jconsole
jdk.internal.jvmstat
jdk.naming.rmi
jdk.sctp
java.security.sasl
javafx.media
javafx.swing
jdk.attach
oracle.net
jdk.xml.dom
jdk.zipfs
jdk.accessibility
oracle.desktop
jdk.security.jgss
jdk.javaws
jdk.httpserver
jdk.plugin
jdk.management.jfr
javafx.web
jdk.jshell
java.xml.crypto
jdk.internal.opt
jdk.security.auth
java.se
jdk.scripting.nashorn
jdk.crypto.cryptoki
java.compiler
jdk.deploy
jdk.net
jdk.naming.dns
java.instrument
jdk.snmp
java.xml
java.logging
On By


Answer This Question


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News