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
16
votes
1 answer

How to fix 'class java.util.LinkedHashMap cannot be cast to class' when using Java 8 and Java 11

I'm working with a micro-service built using Java 11, this service has a dependency built in Java 8. Dependency has rest-clients in it and there is a method that does this: public ResponseEntity> getForList(String url,…
Alex Andrade
  • 342
  • 1
  • 3
  • 14
16
votes
2 answers

When JRE was completely discontinued as a separate offering?

Starting from Java 9 the module system was introduced, making provision of JRE separately redundant. Through, it seems that it was still possible to download it. For example, from here now Java 9 archive Also, here it's only stated that…
anasmi
  • 2,562
  • 1
  • 13
  • 25
16
votes
1 answer

Drag and Drop working differently in Java 11 vs Java 8

I wrote a program which makes use of drag and drop in javafx. In JavaFX8 it works perfectly. In JavaFX11, the drag and drop is dysfunctional: I don't get a different mouse cursor, I don't get a ghost image of the row I'm dragging, and something's…
Grumblesaurus
  • 3,021
  • 3
  • 31
  • 61
16
votes
4 answers

Eclipse 2018-09 won't compile Java 11 source; thinks it is below 1.7

I'm running Eclipse 2018-09 (4.9.0) on Windows 10. I'm using Open JDK 11 GA. I have a Maven project that was specified as using Java 8 source code. UTF-8
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
16
votes
5 answers

Intellij can't find java.net.http when compiling with Java 11

I'm trying to get one of my projects ready for Java 11 but for some reason Intellij can't find java.net.http. It isn't underlining it as not found in module-info.java like it would if I typed it wrong but when I try build the project I get the error…
Will
  • 604
  • 1
  • 5
  • 18
16
votes
2 answers

JDK 11 SSL Error on valid certificate (working in previous versions)

The following code throws an error in JDK 11: HttpURLConnection con = (HttpURLConnection) new URL("https://sis.redsys.es/sis/realizarPago").openConnection(); con.setRequestMethod("GET"); con.getResponseCode(); The error…
cocorossello
  • 1,289
  • 1
  • 17
  • 30
16
votes
1 answer

Java 11: Local-Variable Syntax for Lambda Parameters - applications

I am curious about Java-11 in general, but specifically JEP:323 which plans to add the var declaration to Lambda operation variables. The motivation behind this feature is discussed nicely here. Consider the following quote from the article: // #1 -…
Rann Lifshitz
  • 4,040
  • 4
  • 22
  • 42
15
votes
1 answer

Is setting xmx == xms is still good practice in java 11?

Is setting xmx == xms is still good practice in java-11 with G1 gc? I ask this in the context of web applications.
simo
  • 301
  • 1
  • 4
  • 9
15
votes
2 answers

Why is the Java 11 runtime ignoring my jar containing sun.misc classes?

I am trying to upgrade my code base to Java 11. Unfortunately, my code has a dependency on a third-party library that internally uses sun.misc.BASE64Encoder and Decoder. Since the sun.misc package has been removed from the Java 11 JRE it is failing.…
Vinny Gray
  • 477
  • 5
  • 18
15
votes
1 answer

How to handle HTTP/2 GOAWAY with HttpClient?

I am trying to continuously send GET and POST requests to a REST API every few minutes. The issue is that after exactly 1000 requests I receive a GOAWAY frame (and an IOException): The GOAWAY frame (type=0x7) is used to initiate shutdown of a…
Salem
  • 13,516
  • 4
  • 51
  • 70
15
votes
2 answers

Unable to derive module descriptor: Provider {class X} not in module

I am getting this error message when I try to compile my new modularized Java 11 application: Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for…
Wige
  • 3,788
  • 8
  • 37
  • 58
15
votes
4 answers

Java 11 on AWS beanstalk for Spring boot project

I'm new to Spring Boot and I'm trying to develop an application to later deploy it on AWS beanstalk. I started the project using java 11 but later I discovered that AWS only support java 8. Is it possible to set 'maven.compiler.target' in pom.xml…
Davide C
  • 830
  • 2
  • 11
  • 21
15
votes
4 answers

How to open JavaFX .jar file with JDK 11?

I created a JavaFX project in IntelliJ. I can run project in IntelliJ. I added below code in Configurations): --module-path ${PATH_TO_FX} --add-modules=javafx.controls,javafx.fxml But the output .jar file of project (made with Artifects) doesn't…
DrMorteza
  • 2,067
  • 2
  • 21
  • 29
15
votes
4 answers

Migrate to Java 11 with gradle; UnsupportedOperationException

Trying to switch from jdk 10 to 11 and cannot figure out what library invoke this exception: Caused by: org.gradle.api.GradleException: failed to read class file ../../SomeTestFile.class ... ... Caused by: java.lang.UnsupportedOperationException …
Viktor M.
  • 4,393
  • 9
  • 40
  • 71
15
votes
1 answer

Java 11 JShell inside Intellij IDEA

I have Java 11 JDK and IntelliJ IDEA 2018.2.4 (64-bit). When I was using Java 10.0.2, the JShell console in IntelliJ IDEA worked fine. Now that I've upgraded to Java 11, the JShell console has stopped working. Nothing at all happens when I click on…
Klitos Kyriacou
  • 10,634
  • 2
  • 38
  • 70