Questions tagged [java-11]

Use this tag for questions specific to Java 11, which is version 11 of the Java platform, released on 25 September 2018. In most cases you should also specify the java tag.

JEPs targeted with this JDK release:

  • 181: Nest-Based Access Control
  • 309: Dynamic Class-File Constants
  • 315: Improve Aarch64 Intrinsics
  • 318: Epsilon: A No-Op Garbage Collector
  • 320: Remove the Java EE and CORBA Modules
  • 321: HTTP Client (Standard)
  • 323: Local-Variable Syntax for Lambda Parameters
  • 324: Key Agreement with Curve25519 and Curve448
  • 327: Unicode 10
  • 328: Flight Recorder
  • 329: ChaCha20 and Poly1305 Cryptographic Algorithms
  • 330: Launch Single-File Source-Code Programs
  • 331: Low-Overhead Heap Profiling
  • 332: Transport Layer Security (TLS) 1.3
  • 333: ZGC: A Scalable Low-Latency Garbage Collector    (Experimental)
  • 335: Deprecate the Nashorn JavaScript Engine
  • 336: Deprecate the Pack200 Tools and API

Early access builds are available for this release

Production-ready binaries under the GPL are available from Oracle; binaries from other vendors will follow shortly.

JDK 11 release Notes

JSR 384

2873 questions
10
votes
6 answers

How to get Graal SDK packages to work without Maven?

I am developing a Java application that needs to execute JavaScript. Nashorn JS engine is about to get deprecated and the replacement is the set of APIs provided by Graal SDK which makes use of GraalVM. The virtual machine that essentially executes…
Patrik Nusszer
  • 460
  • 3
  • 13
10
votes
2 answers

NoClassDefFoundError: Unable to load class groovy.xml.jaxb.JaxbGroovyMethods due to missing dependency javax/xml/bind/Unmarshaller

Our Gradle build have --add-modules=java.xml.bind,java.activation,java.xml.ws.annotation to options.compilerArgs in JavaCompile to build with JDK9/10. That works great right now, but these modules are deprecated. I want to prepare for JDK11 where…
neu242
  • 15,796
  • 20
  • 79
  • 114
9
votes
0 answers

How to configure sonar.junit.reportPaths

I have tried severally to configure this sonarqube property sonar.junit.reportPaths within Gradle but still get the same error message. Gradle version -> 6.7.1 SonarQube Server version -> 8.9 (docker image) Java version -> openjdk 11.0.2 Intellij…
Sammy65
  • 627
  • 2
  • 12
  • 28
9
votes
3 answers

IntelliJ Using Wrong JDK - Execution failed for task ':compileJava'. > invalid source release: 11

My project runs on the command line but fails to run in IntelliJ. I've tried all of the solutions in the following questions: Error: Java: invalid target release: 11 - IntelliJ IDEA Execution failed for task ':compileJava'. Gradle Execution failed…
SGT Grumpy Pants
  • 4,118
  • 4
  • 42
  • 64
9
votes
3 answers

Why does my CompletableFuture code run in Java 8 but not in Java 11?

Why does this block of code behave differently in Java 8 vs Java 11? private static String test2() { CompletableFuture .runAsync(() -> IntStream.rangeClosed(1, 20).forEach(x -> { try { …
9
votes
1 answer

NPE from sun.awt.FontConfiguration.getVersion using Apache FOP JDK 11 on Linux system

I am using Apache FOP (v 2.3 and with testing v 2.5). I have recently upgraded from Oracle JDK 8 to Oracle JDK 11. I am using JBoss EAP 7.2 on Oracle Linux (which is RedHat derivative). Everything works fine when using JDK 8, but just the upgrade to…
javafreak
  • 301
  • 1
  • 3
  • 9
9
votes
1 answer

Pentaho Kettle Java 11 Roadmap

Currently Pentaho Kettle (v.9.1) officially only support Java 8. This is a problem for us, since we are maintaining a plugin that needs Java 11 because of a essential library that needs Java 11. Does anyone have details on the roadmap for the…
9
votes
2 answers

IntelliJ Idea: Maven compilation warning about supported annotation processor source version 'RELEASE_6' on Java 11

Upon mvn clean install smart execution in IntelliJ Idea using Java 11 I get the following warning: Warning:java: Supported source version 'RELEASE_6' from annotation processor 'net.java.dev.hickory.prism.internal.PrismGenerator' less than -source…
Nikolas Charalambidis
  • 40,893
  • 16
  • 117
  • 183
9
votes
1 answer

Spark 3.0 is much slower to read json files than Spark 2.4

I have large amount of json files that Spark can read in 36 seconds but Spark 3.0 takes almost 33 minutes to read the same. On closer analysis, looks like Spark 3.0 is choosing different DAG than Spark 2.0. Does anyone have any idea what is going…
smishra
  • 3,122
  • 29
  • 31
9
votes
3 answers

Exit code: 1 - javadoc: error - The code being documented uses modules but ...... are in the unnamed module

Local Java Version is : java version "11.0.7" 2020-04-14 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode) but my project having java version of…
Remo
  • 135
  • 2
  • 11
9
votes
2 answers

JRE created via JLink missing some security certificates (cacerts)

I've created a minified JRE using the JLink tool jlink --add-modules java.base,jdk.crypto.ec --output jre I've created a very basic application that connects to https://www.example.com When I run this application using the JDK, everything works…
Jakg
  • 922
  • 12
  • 39
9
votes
1 answer

Does G1GC release back memory to the OS even if Xms = Xmx?

After reading some answers like this and JEP-346, I have realised that the G1 does release memory back to the OS. However does it release memory back to the OS, even to the point that current memory use can drop below the initial heap memory (i.e…
Adwait Kumar
  • 1,552
  • 10
  • 25
9
votes
8 answers

Remove first(with zero index) element from stream conditionally

I have following code: Stream lines = reader.lines(); If fist string equals "email" I want to remove first string from the Stream. For other strings from the stream I don't need this check. How could I acheve it? P.S. Sure I can transform…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
9
votes
3 answers

Is Mapstruct Java11 compatible?

I'm a bit confused. There is some documentation that says java 9 is "experimental": https://mapstruct.org/documentation/stable/reference/html/#_using_mapstruct_on_java_9 And I found a post where a guy was having trouble in Java 10. So we are…
markthegrea
  • 3,731
  • 7
  • 55
  • 78
9
votes
1 answer

Java 11 HttpRequest with PATCH method

I try to use the java 11 HttpRequest to call the msgraph webservice using the method PATCH: import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.URI; import…
laloune
  • 548
  • 1
  • 9
  • 26