Create Module in JShell in Java 9

Just exploring new release of Java, its new module system, and playing with jshell as well. Probably my question doesn't have too much sense, but I am just curious. So I came up with the question: Is there any way to create a module in jshell? Or mo...
more »

2017-10-02 22:10 (1) Answers

Classloaders hierarchy in Java 9

As of Java-8, I know the hierarchy of the classloaders has been as follows:- Bootstrap classloader -> Extension classloader -> Application classloader What is the change in the hierarchy of classloaders in Java 9 and how does it works? ...
more »

2017-09-29 19:09 (2) Answers

How to extract the file jre-9/lib/modules?

In JRE-9/lib directory (at least on Windows), there is a new file called modules whose size is about 107 MB. Is it possible to extract that file or maybe list java modules within it? I can see that a new tool called jmod is available at jdk-9/bin/jm...
more »

2017-09-27 04:09 (4) Answers

How to get jar file name by Module in Java 9?

For example I have somefile-0.1.jar jar file which contains JPMS module. Besides, I have a reference Module somemodule to this module. How to get jar file name by Module (using somemodule reference)? I've examined Module API but didn't find a way t...
more »

2017-09-20 12:09 (1) Answers

How to remove module layer in Java 9?

I have three modules: module-a, module-b, module-c. Module-a and module-b are in boot layer. Layer for module-c I create myself. Module-c has JPMS implementation of the service which interface is in module-a. This is the way I create layer with modu...
more »

2017-09-20 10:09 (2) Answers

How to get module name by class in Java 9?

How to get module name by class in Java 9? For example, let's consider the following situation. There are two named modules - ModuleA and ModuleB. ModuleA knows nothing about ModuleB. ModuleB requires ModuleA. ModuleA contains class: public class C...
more »

2017-09-17 19:09 (1) Answers

Build module from jar with dependencies

Is there any tool or technique to build valid java-module from old plain jar with its dependencies? It would solve split package problem in old libraries. There is similar question, but automatic modules cannot help in this case. ...
more »

2017-09-15 15:09 (0) Answers

Java9 JNLP --add-opens not working

I have created a simple test case to test Java 9 Web Start with the new modules. Unfortunately, Java 9 Web Start does not by default support --permit-illegal-access like regular Java 9 does. Java 9 Web Start is suppose to support --add-opens (see h...
more »

2017-08-31 00:08 (1) Answers