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
14
votes
4 answers

The Java ZGC garbage collector USES a lot of memory

I built a simple application using Springboot.The ZGC garbage collector I use when deploying to a Linux server USES a lot of memory..I tried to limit the maximum heap memory to 500MB with Xmx500m, but the JAVA program still used more than 1GB. When…
greyWolf
  • 141
  • 1
  • 4
14
votes
6 answers

java.lang.ClassNotFoundException: com.sun.org.apache.xml.internal.resolver.CatalogManager Java 11

I have a JavaFX application I was migrating from Java 8 to Java 11, it has been a rough transition but most of the application is working except for the web service, it keeps giving me the exception: Exception in thread "main"…
Astonio
  • 635
  • 2
  • 8
  • 21
14
votes
2 answers

Different deserialization behavior between Java 8 and Java 11

I have a problem with deserialization in Java 11 that results in a HashMap with a key that can't be found. I would appreciate if anyone with more knowledge about the issue could say if my proposed workaround looks ok, or if there is something better…
Anderson Vieira
  • 8,919
  • 2
  • 37
  • 48
14
votes
2 answers

Handling change in newlines by XML transformation for CDATA from Java 8 to Java 11

With Java 9 there was a change in the way javax.xml.transform.Transformer with OutputKeys.INDENT handles CDATA tags. In short, in Java 8 a tag named 'test' containing some character data would result in: But with Java…
Rick
  • 935
  • 2
  • 7
  • 22
14
votes
1 answer

package javafx.util does not exist

I am running java version 11.0.2 on a Mac. WHen I compiled a java file that imports javafx.util.pair I got an error: package javafx.util does not exist. There are not many useful resources to solve this issue. I tried different suggestions…
LED Fantom
  • 1,229
  • 1
  • 12
  • 32
14
votes
2 answers

How to run XJC with Java 11 and maven?

To generate java classes from XSD (for reading XML files), we used jaxb2-maven-plugin and Java8. For java 11, we get many issues... What libraries and plugins do work (today), allowing to generate java code from XSD using java 11 and maven? If…
Walter Kuhn
  • 479
  • 1
  • 6
  • 19
14
votes
2 answers

CXF codegen maven plugin doesn't work OpenJDK 11

I have been working with JDK 9 & 10 and CXF codegen plugin 3.2.5 and 3.2.6 with no problems but, today I'm trying to update my codebase from Oracle JDK 10 to OpenJDK 11 build 28, but I'm always getting the same error: [INFO] Error occurred during…
Nico
  • 858
  • 2
  • 11
  • 27
14
votes
2 answers

How to get JavaFX and Java 11 working in IntelliJ IDEA

With the recent Java 11 release, JavaFX is no longer included in the JDK. I have an existing JavaFX project. I am interested in learning how to change it from a Java 10 project to a Java 11. I am certain I have installed Java 11 correctly, and I…
Jack J
  • 1,514
  • 3
  • 20
  • 28
13
votes
2 answers

How to test java.net.http (Java 11) requests BodyPublisher?

I'm trying to test my code which uses the new Java 11 java.net.http.HttpClient. In my production code I have something like this: HttpClient httpClient = ... (gets injected) HttpRequest request =…
Itchy
  • 2,263
  • 28
  • 41
13
votes
2 answers

How to define multiple parameters for a POST request using Java 11 HTTP Client

I have a code that makes a POST request for a specific endpoint. This code is using Apache's HttpClient and I would like to start using the native HttpClient from Java (JDK11). But I didn't understand how to specify the parameters of my…
Renan Gomes
  • 771
  • 1
  • 15
  • 34
13
votes
1 answer

The method isEmpty() is undefined for the type Optional

I have a spring project where i have a boolean method which uses optional to filter through a set of requests. Im getting an error when i try return request.isEmpty(), I looked it up and i might be using an older version of java but is there any…
Jane Ryan
  • 159
  • 1
  • 1
  • 8
13
votes
3 answers

Require assistance with simple pure Java 11 WebSocket client example

There appears to be very little Java 11 (pure Java non framework based) WebSocket client code examples on the web so I'm hoping StackOverflow can come to the rescue for me once again. This is the closest I've found, but unfortunately to my (novice)…
eodeluga
  • 608
  • 2
  • 7
  • 20
13
votes
4 answers

How to execute AWS lambda with Open JDK 11+ as custom runtime?

AWS allows to create Lambda function with Java 8 (OpenJDK 8) as runtime. I need to create a simple function using Open JDK 11. Something like that: package example; import com.amazonaws.services.lambda.runtime.Context; import…
veben
  • 19,637
  • 14
  • 60
  • 80
13
votes
3 answers

Move to OpenJDK-11 but compile in Java 8

I have an existing Spring boot App that i build through gradle . All these days I have been using JDK / JRE 8 and now I am trying to use JDK-11 So to check the Compatability, I am setting the JAVA_HOME to JDK-11 but trying to compile in Java 8…
Arun
  • 3,440
  • 11
  • 60
  • 108
13
votes
2 answers

What makes Maven want openjfx with Zulu Java 11 and not Zulu Java 8 for a Spring Boot project?

I have inherited a Spring Boot project where we would like to use Java 11 for testing due to the nice features added in Java 9 and 10 (var and List.of(...)). The Maven project is split up in several parts where the code for production is set up…
Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347