public static List<String> listJdkModules() {
		ModuleLayer ml = ModuleLayer.boot();
		return ml.modules()
			.stream()
			.filter(m -> m.isNamed() && m.getAnnotation(Deprecated.class) == null
					&& (m.getName().startsWith("java.") || m.getName().startsWith("jdk."))
					&& (!m.getName().equals("jdk.naming.ldap")))
			.map(m -> m.getName())
			.collect(Collectors.toList());
	}
WARNING: This file MUST be compiled with Java 9+
src/main/java9/dev/jbang/util/ModuleUtil9.java