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

SunPKCS11 provider in Java 9

Up to Java 8 the SunPKCS11 provider was loaded like this: Provider provider = new (new ByteArrayInputStream (configFile.getBytes ()); Security.addProvider (provider); "configFile" is a String with the configuration pa...
more »

2017-10-02 10:10 (2) Answers

Run Flow in main thread

Again I´m comparing RxJava with Java 9 Flow. I see that Flow by default is asynchronously, and I was wondering if there´s a way to make it run synchronously. Sometimes we just want to use it not for Nio but for sugar syntax, and have a more homog...
more »

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

Is maven-release-plugin compatible with Java 9?

I just tried to release my Java 9 compatible project with maven-release-plugin. However, it failed in maven-compiler-plugin with Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project...
more »

2017-09-30 18:09 (1) Answers

Java 9 Flow define subscriber with lambdas

I start playing with Java 9 Flow API, and the first thing that I found and dont like, it´s seems like we cannot use lambdas when we pass a subscriber implementation into the publisher as we can do with RxJava So I have to define and implement my ow...
more »

2017-09-30 14:09 (2) Answers

How to export all packages from Java 9 module?

Right now, for every module I have, I need to explicitly specify packages I want to export. For example: module core { exports cc.blynk.server.core; exports cc.blynk.server.core.protocol.handlers.decoders; exports
more »

2017-09-30 14:09 (1) Answers

directory layout for Java 9 modules

I've been trying to write a Java 9 module, but no matter what I do, I get the error "package is empty or does not exist". I've tried searching online for the expected directory layout, and tried every variation on directory layout I can think of, but...
more »

2017-09-30 02:09 (1) Answers

Is Java 9 modularity for WAR files as well?

A Java EE 7 application server, and specifically a Servlet 3.1 container should allow us to deploy a WAR file that contains a web application. And a WAR file is essentially a JAR with deployment descriptor (web.xml) and couple of other elements. On ...
more »

2017-09-29 23:09 (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

Reliable configuration in Java 9

One of the main goals of project Jigsaw in Java 9 is the reliable configuration. That is, Java 9 promises to address the classpath mechanism flaw that allows the java launcher to run a program without making sure that all necessary classes will be av...
more »

2017-09-28 00:09 (2) Answers

Gradle - Java 9 - spring-data-ja

I try to build an already existing project with the JDK 9 and gradle. I think I have a problem with the module loading. Here is a sample of my gradle dependencies : compile("org.springframework:spring-context:${spring_version}"){ exclude gr...
more »

2017-09-27 14:09 (1) 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 do I run images generated by JDK 9 jlink?

I follow the Jigsaw quickstart here. I successfully ran the jlink command given: jlink --module-path $JAVA_HOME/jmods:mlib --add-modules com.greetings --output greetingsapp That produces a "runtime image" which is an exploded directory structure t...
more »

2017-09-25 22:09 (1) Answers

JDK 9 + Mac OS + jlink?

I installed the release version of JDK 9 on Mac OS. jshell works great, Jigsaw module support works, but there is no jlink: ➜ java --version java 9 Java(TM) SE Runtime Environment (build 9+181) Java HotSpot(TM) 64-Bit Server VM (build 9+181, mix...
more »

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