How to inject module declaration into JAR?

Suppose I have some library lib.jar for which I do not have the source code (or it is written in some non-Java language which is unaware of modules yet). lib.jar does not have module-info.class and I do not want to use it as an automatic module, so I...
more »

2017-11-10 12:11 (2) Answers

Java 9: How to find every new method added

With the release of Java 9, numerous methods have been added to many classes, most (if not all) of which contain the following in their documentation: Since: 9 Does a collection of these new methods exist? If so, where is it located? If not, ...
more »

2017-11-08 19:11 (2) Answers

Maven Site Plugin with Java9

I have a problem running my CI builds on Travis with Java9 (Oracle JDK 9). I fails on maven-site-plugin - after removing it everything works smothly. I tried removing everything else to check for possible dependencies collisions, left out with just...
more »

2017-10-30 17:10 (1) Answers

Java Web Start support in Java 9 and beyond

I'm confused about the status of Java Web Start. On Oracle's Support Roadmap we can read this: Support of Deployment Technology The web deployment technology, consisting of the Java Plugin and Web Start technologies, has a shorter support l...
more »

2017-10-24 09:10 (1) Answers

Self-Contained Applications

I've watched a few online presentations that briefly mentioned self-contained applications in Java 9, but I have a question that I would like cleared up. With the new module system, you're now allowed to only include the minimum amount of code requi...
more »

2017-10-21 08:10 (2) Answers

How is takeWhile different from filter?

How is takeWhile() different from filter() in Java 9. What extra utility does it have? Stream.of(1,2,3,4,5,6,7,8,9,10).filter(i -> i < 4 ) .forEach(System.out::println); This is perhaps what following would do Stream.of(1,2,3,4,5,6,...
more »

2017-10-20 15:10 (4) Answers

add java 9 system modules to compile in eclipse

I have some legacy Java code, ie.: package org.alo.test.j9; import javax.activation.DataHandler; // in java.activation module import javax.annotation.PostConstruct; // in java.xml.ws.annotation module public class OldClass { public static void...
more »

2017-10-17 16:10 (1) Answers

jcmd VM.set_flag, which flags are writable?

I was trying to experiment with jcmd VM.set_flag option. But came across one error saying "only 'writeable' flags can be set". What are writable flags ? Getting my pid: XXX@XXX-Air:~/javacode$ jcmd -l 6294 Test 6295 jdk.jcmd/sun.tools.jcmd.JCmd -l ...
more »

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

What is an automatic module?

Automatic modules are mentioned many times on stackoverflow but I couldn't find a complete, succinct and self-sufficient definition of an automatic module. So, what is an automatic module? Does it export all packages? Does it open all packages? Does...
more »

2017-10-14 09:10 (3) Answers

What is the use of C option in jshell

I have gone through the introduction to jshell guide and couldn't find description/examples about the -C option in jshell. $jshell --help -C<flag> Pass <flag> to the compiler. Use one -C for each com...
more »

2017-10-14 07:10 (2) Answers

Using JUnit 5 with Java 9 without Maven or Gradle

The Description: I would like to create a JUnit test using JUnit 5 in Eclipse (Oxygen 4.7.1a). This JUnit test should be inside a seperate src folder called Test. However, I ran into the following problems as I'm new to JUnit and Java 9. I do not w...
more »

2017-10-11 21:10 (1) Answers

JDK 9 API documentation download

Is there a downloadable zip file of the Java 9 API documentation? It would be handy for offline coding. Java 8 documentation can be downloaded from - http://www.oracle.com/technetwork/java/javase/documentation/jdk8-doc-downloads-2133158.html linke...
more »

2017-10-11 18:10 (2) Answers