How to use 3rd party library in Java9 module?

You can use your library as an automatic module. An automatic module is a module that doesn’t have a module descriptor (i.e. module-info.class). But what name do you need to specify to refer to an automatic module? The name of the automatic module is derived from the JAR name (unless this JAR contains an Automatic-Module-Name … Read more

Java Web Start support in Java 9 and beyond

According to http://www.oracle.com/technetwork/java/javase/9-deprecated-features-3745636.html Java Deployment Technologies are deprecated and will be removed in a future release Java Applet and WebStart functionality, including the Applet API, The Java plug-in, the Java Applet Viewer, JNLP and Java Web Start including the javaws tool are all deprecated in JDK 9 and will be removed in a future release. … Read more

Is it possible to mix –class-path and –module-path in javac (JDK 9)?

You can use class path and module path in parallel, but there are a few details to consider. Dependency Module Path ~> Class Path Explicit modules (JARs with a module descriptor on the module path) can not read the unnamed module (JARs on the class path) – that was done on purpose to prevent modular … Read more

Scanning classpath/modulepath in runtime in Java 9

The following code achieves module path scanning in Java 9+ (Jigsaw / JPMS). It finds all classes on the callstack, then for each class reference, calls classRef.getModule().getLayer().getConfiguration().modules(), which returns a a List<ResolvedModule>, rather than just a List<Module>. (ResolvedModule gives you access to the module resources, whereas Module does not.) Given a ResolvedModule reference for each … Read more

How to express dependency in maven on java ee features for transition to Java 9?

The Module System speaks of the way the unnamed modules as in your case of loading the application from classpath constructs the module graph. Further, from the documentation itself:- When the compiler compiles code in the unnamed module, or the java launcher is invoked and the main class of the application is loaded from the … Read more

What is the replacement for javax.activation package in java 9?

JavaBeans Activation Framework (JAF) is possibly the alternative you are looking for to the existing package. This standalone release of JAF uses a Java Platform Module System automatic module name of java.activation, to match the module name used in JDK 9. A future version will include full module metadata. The standalone APIs are supported in … Read more

javax.xml.bind.JAXBException Implementation of JAXB-API has not been found on module path or classpath

Add these dependencies into your pom/gradle: Gradle: compile(‘javax.xml.bind:jaxb-api:2.3.0’) compile(‘javax.activation:activation:1.1’) compile(‘org.glassfish.jaxb:jaxb-runtime:2.3.0’) Pom: <!– https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api –> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.0-b170201.1204</version> </dependency> <!– https://mvnrepository.com/artifact/javax.activation/activation –> <dependency> <groupId>javax.activation</groupId> <artifactId>activation</artifactId> <version>1.1</version> </dependency> <!– https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-runtime –> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> <version>2.3.0-b170127.1453</version> </dependency>

List the modules resolved during the application startup

Module Resolution The module resolution is a two-step process. The first step recursively enumerates the ‘requires’ directives of a set of root modules. If all the enumerated modules are observable, then the second step computes their readability graph. The readability graph embodies how modules depend on each other, which in turn controls access across module … Read more