Questions tagged as 'java-9'

3
answers

Maven Module vs Java 9 Module

In addition to the fact that Maven works with jars and Java 9 with "modules", what is the difference between the modularization system of the two? Why would I fail to modularize my systems with Maven to modularize with Java 9?     
asked by 04.08.2017 / 16:20
1
answer

What is the difference between Arrays.asList and List.of?

Studying Java 9, I saw a new method that works with collections: List.of , example: List<String> frutas = List.of("maça", "laranja"); I already used Arrays.asList , for example: List<String> frutas = Arrays.asList(...
asked by 06.10.2017 / 14:46
1
answer

Alternative to Observable and Observer in Java 9

For testing purposes, I'm porting an application from version 7 to version 9 of Java. This application has some features that use Observer and Observable . I noticed that both have become obsolete: @Deprecated(since="9") pub...
asked by 06.10.2017 / 16:04
1
answer

How to compile a Java 9 project with Lombok in Gradle?

TL; DR    How to pass multiple parameters -J--add-opens=<pacote>=ALL-UNNAMED so that Gradle uses them when invoking javac ? Details I have a HelloWorld.java code using Lombok in Java 9: import lombok.NonNull;...
asked by 14.11.2017 / 16:36
1
answer

What is the purpose and where should I use "strictfp"

I was reading the Java 9 specification and I came across the keyword strictfp , l for what it's just that was not clear. What good is this and where should I apply? Why is not it so used in programs today? Why was not it removed...
asked by 21.12.2018 / 21:12
1
answer

onSpinWait Java 9

I'm porting a Java 8 to 9 application, I have some processes that use the Watchdog concept, which use something similar to: public synchronized void run() { until = System.currentTimeMillis() + watchdogParam.getTimeout(); while (!can...
asked by 24.10.2017 / 19:15
1
answer

Modular Maven project with Java10 modular does not find the java module

I am adapting the exercise of the book "Java 9 - Interactive, reactive and modularized - author Rodrigo Turini" for a modular maven project with modular java 10. But when running, you are not encountering the java project modules ~/AmbienteDeD...
asked by 02.06.2018 / 22:47
0
answers

Is it possible to create more than one module java9 (module-info) per project mavem in eclipse?

I'm testing the java 9 module system and so far I've been able to create a project in eclipse (maven or java) and create the modulo-info option: Right-click on the project + configure + create module-info. But if you need to separate the proj...
asked by 07.05.2018 / 21:32