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
11
votes
3 answers

Java 11 HttpClient Http2 Too many streams Error

I am using HttpClient of Java 11 to post the request to an HTTP2 server. The HttpClient Object is created as a Singleton Spring bean as shown below. @Bean public HttpClient getClient() { return…
mnpr
  • 325
  • 4
  • 8
11
votes
3 answers

Why does the getResource() method return null in JDK 11?

Simple Java program: public static String loadText(String file) { StringBuilder finalString = new StringBuilder(); InputStream in = null; BufferedReader reader = null; InputStreamReader isr = null; try{ …
Alexey
  • 119
  • 1
  • 2
  • 8
11
votes
2 answers

Maven surefire and JDK 11

I'm trying to get Maven surefire to run under JDK 11 but I keep getting these errors: If I set reuseForks to true: Error occurred in starting fork, check output in log Process Exit Code: 1 at…
Gnas
  • 698
  • 1
  • 6
  • 14
11
votes
4 answers

How to fix jfoenix modules with javafx 11

So I'm adding my requires for module-info.java and finally got my program to load but as soon as tab pane wants to load from jfoenix library this error is thrown. Caused by: java.lang.IllegalAccessError: class com.jfoenix.skins.JFXTabPaneSkin (in…
exceptionsAreBad
  • 573
  • 2
  • 5
  • 17
10
votes
3 answers

How to resolve gradle tls connection after upgrading from 5.4 to 6.8.3?

I upgrade the projects Gradle version from 5.4.1 to 6.8.3 and have changed the custom repository to https. I had a similar issue with maven but after mirroring has been solved. I can build the project without anyproblem with gradle 5.4.1 but when I…
celcin
  • 304
  • 1
  • 4
  • 14
10
votes
1 answer

Cannot package signed Java security providers with JMOD

I'm reading this documentation about implementing a provider in the Java cryptography architecture and it states that You cannot package signed providers in JMOD files The article also states: Only providers that supply instances of Cipher,…
travesty
  • 101
  • 5
10
votes
1 answer

Why is --add-modules necessary for modules which are on the module path?

An example: since JavaFx was dropped from the JDK, the JavaFx SDK is now distributed as a set of modular jars. To compile a JavaFx application, of course you have to put them on the module path: javac -p /path/to/jars/ App.java That doesn't…
hat
  • 781
  • 2
  • 14
  • 25
10
votes
2 answers

Offheap leak after compiling with java 11

After upgrading our Spring web app maven build to Java 11 we see a constant increase in memory consumption from the java process. Works fine: Build with Java 8 JDK + run on server with Java 11 Has leak: Build with Java 11 + run on server with Java…
Jeppz
  • 912
  • 1
  • 8
  • 31
10
votes
3 answers

Java 11 SSLHandshakeException with TLS 1.3: How do I revert to TLS 1.2?

My application is a form of "web scraper" which loads the HTML from a desired input page using the Java Jsoup library. I recently upgraded my application platform from Java 8 to Java 11. With this upgrade, I have received several reports from my…
Soham
  • 762
  • 1
  • 5
  • 14
10
votes
2 answers

Compile android app with java 11 dependencies

I am trying to build an android app with some dependencies compiled in java 11. I have configured this in the build.gradle : android { compileOptions { sourceCompatibility = 1.11 targetCompatibility = 1.11 } ... } And I have…
hachiko
  • 121
  • 1
  • 1
  • 6
10
votes
3 answers

Java Maven Project "Source option 5 is no longer supported. Use 6 or later."

I'm following a PluralSight course, "Spring Framework: Spring Fundamentals" by Bryan Hansen. I've followed the demo precisely (I believe) but am getting the error message "Error:java: Source option 5 is no longer supported. Use 6 or later.". I'm…
SpartanHedgey
  • 451
  • 1
  • 4
  • 7
10
votes
6 answers

SonerQube doesnt start

Sonarqube Startup script does not start ob ubuntu 16.04 Error log shows: Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11+ to run java.lang.IllegalStateException: SonarQube requires Java 11+ to run …
cryptoparty
  • 345
  • 1
  • 5
  • 20
10
votes
1 answer

Cannot compile method reference in JDK 11

I am currently migrating a project to JDK 11 and compiling it with Maven. However, Maven throws a wobbly over a single method reference (it doesn't have issues elsewhere). The method in question looks like this: public class MyThing { boolean…
Druckles
  • 3,161
  • 2
  • 41
  • 65
10
votes
2 answers

How to keep connection alive in Java 11 http client

I'm using the Java 11 HttpClient with HTTP/2 and need to keep connection alive for few minutes, but the builder does not have the option to set it. Is there a way to specify this and make client keep the connection alive for some time?
qiGuar
  • 1,726
  • 1
  • 18
  • 34
10
votes
2 answers

Scala 12.x and Java 11 `String.lines`, how to force the implicit conversion in a chained call?

Problem description Scala StringOps provides a lines method that returns an Iterator[String]. Java 11 added lines() with return type java.Stream[String]. In a chained method call like val text: String text.lines.foldLeft("")(_ + _) the code will no…
Andreas Neumann
  • 10,734
  • 1
  • 32
  • 52