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

Java 11 : Error:java: invalid source release: 11 - Not sure what to do anymore

Hello so i have upgraded from java 8 to java 11 and i get this error no matter what.I am using intellij and windows 10. What i have changed to 11: 1)In Project Structure -> Project: 2)Project Structure ->Modules 3)My compiler module Target…
helloApp
  • 449
  • 1
  • 4
  • 21
21
votes
1 answer

Is there a lightweight method which adds a safepoint in Java 9+

Is there a cheaper method call in Java 9+ which keeps its safepoint? The JVM removes safepoints at runtime to improve efficiency however this can make profiling and monitoring the code more difficult. For this reason, we deliberately add trivial…
Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
21
votes
1 answer

Why doesn't removing from a TreeSet with a custom comparator remove a larger set of items?

Using both Java 8 and Java 11, consider the following TreeSet with a String::compareToIgnoreCase comparator: final Set languages = new…
Nikolas Charalambidis
  • 40,893
  • 16
  • 117
  • 183
21
votes
6 answers

OpenJDK JDK11 not having JMC- Java Mission Controller- FlightRecorder

I was hoping JMC would be available with OpenJDK, JDK11 binaries as this has been opensourced from Java 11 by oracle, but could not locate this in Oracle and AdoptOpenJDK Java-11 binaries under bin folder. I have also tried this…
tarunk
  • 549
  • 2
  • 7
  • 17
21
votes
3 answers

Not able to run java 11 sample program in intellij

public class First { public static void main(String[] args) { System.out.println("Hello Java 11"); } } I am trying to run above program in Java 11 with intellij. But getting below Error. Information:javac 11 was used to compile java…
shubham12511
  • 620
  • 1
  • 9
  • 25
20
votes
5 answers

AWS - How to install java11 on an EC2 Linux machine?

I tried this Downloading Java JDK on Linux via wget is shown license page instead but I keep getting a 404 error. This command "sudo amazon-linux-extras install java-openjdk11" just states that amazon-linux-extras doesnt exist.
James M
  • 253
  • 1
  • 3
  • 8
20
votes
3 answers

How to map a JSON response to a Java class using Java 11 HttpClient and Jackson?

I'm new to the Java 11 HttpClient and would like to give it a try. I have a simple GET request that return JSON and I would like to map the JSON response to a Java class called Questionnaire. I understand that I can turn the response out of box into…
saw303
  • 8,051
  • 7
  • 50
  • 90
19
votes
4 answers

Java SDK 11.0 or above is required when using .NET 6 or higher

I've installed .NET 6 (version 6.0.100-rc.1.21458.32) and Visual Studio 2020 Preview (although it might be not a prerequisite). I am trying to debug a hello-world application but I am getting a build error regarding Java. C:\Program…
Themelis
  • 4,048
  • 2
  • 21
  • 45
19
votes
1 answer

Getting a javaFX 11 app to work on docker

I am trying to get an application that works perfectly on my machine to run on docker, here is my docker file : FROM openjdk:11-jre-slim VOLUME /tmp ADD someJar.jar someJar.jar ADD lib lib ADD config.properties config.properties ENTRYPOINT ["java",…
Martin
  • 1,977
  • 5
  • 30
  • 67
19
votes
4 answers

How can I bundle the JAXB runtime libraries with OpenJDK 11?

Background: In my organization there are a lot of Java based Windows desktop applications. In our proprietary software deployment system the applications don't contain an individual JRE / JDK. Rather a common JRE (so far Oracle 8 Java SE JRE) is…
mabu
  • 311
  • 2
  • 6
19
votes
1 answer

How to get tools.jar for OpenJDK 11 on Windows?

Background: I am trying to build Hadoop for Windows using instructions found here. I have OpenJDK 11 and have ran into the following issue while running mvn package: Could not resolve dependencies for project…
R Y
  • 455
  • 1
  • 3
  • 13
19
votes
2 answers

Is Java ReDos vulnerable?

I tried to recreate regular expression denial of service attack using (a+)+ regexp and aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa! (with large amounts of a) input using jshell: Pattern.compile("(a+)+") …
Krzysztof Krasoń
  • 26,515
  • 16
  • 89
  • 115
19
votes
3 answers

Maven with JDK 11 fails when downloading a wrong dependency with "extension (10) should not be presented in server_hello"

Running test on my project with JDK11 I get failures at this line when calling Maven Aether: https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/master/src/main/java/com/lazerycode/jmeter/mojo/ConfigureJMeterMojo.java#L643 This happens…
UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
19
votes
2 answers

Running javafx sample on JDK 11 with OpenJFX 11 JMODS on Module Path

I have downloaded the JavaFX Jmod files from OpenJFX project and placed them in the directory G:\openjfx\javafx-jmods-11. I am using OpenJDK 11 which has no JavaFX jmod in JAVA_HOME/jmods i.e it doesn't come with JavaFX distribution. Module info…
MohamedSanaulla
  • 6,112
  • 5
  • 28
  • 45
18
votes
2 answers

Criteria for default garbage collector Hotspot JVM 11/17

I found a source describing that the default gc used changes depending on the available resources. It seems that the jvm uses either g1gc or serial gc dependnig on hardware and os. The serial collector is selected by default on certain hardware and…
Paul7979
  • 210
  • 1
  • 3
  • 10