Where to place module-info.java using Java 9?

I have an OSGI application and I have around 30 bundles (jar files). Today I decided to see how it works/if it works with Java 9. So I started my application and got WARNING: An illegal reflective access operation has occurred WARNING: Illegal refl...
more »

2017-09-05 20:09 (3) Answers

Why is exporting the entire module not allowed?

In Java 9's module declaration there are 2 constructs: exports com.foo; And opens com.foo; Where exports grants compile-time access, while opening allows runtime access, as reflection and resources. Opening has one leniency over exporting tha...
more »

2017-07-23 22:07 (1) Answers

Loading classes and resources in Java 9

I was reading this article on InfoQ quoting Reinhold: Developers can still use the Java class path in Java 9 for the Java runtime to search for classes and resource files. It's just that with Java 9's modules, developers no longer need the cl...
more »

2017-07-18 14:07 (1) Answers

Java 9: Exporting packages to unnamed modules fail

I am trying to build an open-source project against Java 9. There are some files which I need to access using reflection but I cannot because the packages are not exported by their modules. I export the packages to unnamed modules by using the argume...
more »

2017-06-26 11:06 (2) Answers

Why did Java 9 introduce the JMOD file format?

Java 9 has three ways to package compiled code in files: JAR JMOD JIMAGE JIMAGE is optimized for speed and space and used by the JVM at runtime so it makes sense why JIMAGE was introduced. JIMAGE files are not supposed to be published to maven r...
more »

2017-06-24 06:06 (1) Answers

unrecognized option : --print-module-descriptor

I am following the steps in Java 9 Jigsaw early access release quick start guide at http://openjdk.java.net/projects/jigsaw/quick-start ➜ tmp java --version java 9-ea Java(TM) SE Runtime Environment (build 9-ea+172) Java HotSpot(TM) 64-Bit Server...
more »

2017-06-04 19:06 (1) Answers

Is there dynamic module discovery in JDK9?

In the upcoming Java 9, is there a way to dynamically discover which modules are available? E.g.: Run some app with some module path While the app is running, add a few more modules into the module path (e.g. copy into module directories) From wit...
more »

2017-06-02 21:06 (2) Answers

Are cycles allowed between platform modules?

This is the module declaration of the java.rmi module: module java.rmi { requires java.base; requires java.logging; exports java.rmi.activation; exports com.sun.rmi.rmid to java.base; // <-- cycle ... } So, there is a cycli...
more »

2017-05-22 06:05 (1) Answers

"Module local" access behaviour in Java 9

As the core of Jigsaw project is Java Module System, it would be nice to have an ability to restrict access to particular program elements (classes, methods and fields) within particular module only. It can be helpful when there are some elements i...
more »

2016-08-11 15:08 (2) Answers