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

Is there a replacement for the garbage collection JVM args in Java 11?

In Java 11 a number of JVM args relating to GC logging are not supported anymore. What, if anything, can they be replaced with, if we still want to use GC logging? In particular, this relates to the following JVM args:…
martin_wun
  • 1,599
  • 1
  • 15
  • 33
52
votes
5 answers

Does java 11 support android?

I am new to android development. And I have installed eclipse, java 11 and android sdk tools in my computer. But when I try to build a project it says that to upgrade tools. But I have installed the latest sdk. When I'm reading in internet I found…
Seniru Pasan
  • 753
  • 1
  • 7
  • 13
49
votes
5 answers

Netty- cannot access class jdk.internal.misc.Unsafe

When I upgraded the Java from 8 to 11, I got an error from Netty about the "jdk.internal.misc.Unsafe", the details are below: I knew it is a debug level message, and I can change the level of the log to ignore it. But I'm not sure if there would be…
oarsmanli
  • 655
  • 1
  • 6
  • 6
47
votes
1 answer

Java 11 package javax.xml.soap does not exist

I'm trying to create a simple message using SOAP: MessageFactory mf = MessageFactory.newInstance(); SOAPMessage message = mf.createMessage(); When I build the project with Java 8 it's fine, but building it with Java 11 fails with a compilation…
Boris
  • 22,667
  • 16
  • 50
  • 71
47
votes
3 answers

Unable to use Lombok with Java 11

We upgraded the Java version from 8 to 11 but I got compile errors of getter/setter methods where I implemented the POJO classes with Lombok's Getter and Setter Annotations. Is there a way to use Lombok's @Data annotation which provides getter and…
Tonyukuk
  • 5,745
  • 7
  • 35
  • 63
45
votes
3 answers

JavaFX 11 : Create a jar file with Gradle

I am trying to upgrade a JavaFX project from the 8 Java version to the 11 version. It works when I use the "run" Gradle task (I followed the Openjfx tutorial), but when I build (with the "jar" Gradle task) and execute (with "java -jar") a jar file,…
Flpe
  • 771
  • 1
  • 8
  • 12
43
votes
2 answers

What is the difference between JDK_JAVA_OPTIONS and JAVA_TOOL_OPTIONS when using Java 11?

What is the exact difference between JDK_JAVA_OPTIONS and JAVA_TOOL_OPTIONS when using Java 11? I'm using a tiny test program: public class Foo { public static final void main(String[] args) { System.out.println("arg: " +…
neu242
  • 15,796
  • 20
  • 79
  • 114
41
votes
3 answers

javax.net.ssl.SSLException: No PSK available. Unable to resume

I am using Jetty client to send outgoing requests. Code that runs perfectly under Java 10 suddenly gets the following exception under Java 11: javax.net.ssl.SSLException: No PSK available. Unable to resume. at…
Gili
  • 86,244
  • 97
  • 390
  • 689
38
votes
1 answer

Why does javac insert Objects.requireNonNull(this) for final fields?

Consider the following class: class Temp { private final int field = 5; int sum() { return 1 + this.field; } } Then I compile and decompile the class: > javac --version javac 11.0.5 > javac Temp.java > javap -v Temp.class …
ZhekaKozlov
  • 36,558
  • 20
  • 126
  • 155
37
votes
6 answers

How to add JavaFX runtime to Eclipse in Java 11?

I am getting the following error as Java 11 excluded the JavaFX as part of the latest version. Error: JavaFX runtime components are missing, and are required to run this application So how can I add JavaFX to Eclipse in Java 11? Thanks.
user3520615
  • 367
  • 1
  • 4
  • 6
37
votes
4 answers

Difference between isEmpty() and isBlank() Method in java 11

Java 11 has added A new instance method isBlank() to java.lang.String class. What's the basic difference between the existing isEmpty and newly added isBlank() method?
Niraj Sonawane
  • 10,225
  • 10
  • 75
  • 104
36
votes
8 answers

Eclipse 4.12 - java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory

I am getting the error below while running my eclipse plugin. Eclipse used 4.12 with java11. It used to work fine in eclipse 4.6.3 + java8. javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory not found - with linked…
Java dev
  • 437
  • 1
  • 4
  • 12
36
votes
3 answers

Allow insecure HTTPS connection for Java JDK 11 HttpClient

Sometimes it is needed to allow insecure HTTPS connections, e.g. in some web-crawling applications which should work with any site. I used one such solution with old HttpsURLConnection API which was recently superseded by the new HttpClient API in…
vagran
  • 867
  • 1
  • 7
  • 18
36
votes
2 answers

Springboot: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

I know, it is duplicate question,but problem is new, Please do not mark duplicate question. This program runs in Window 10 it's run fine and create a database, but when same program runs in Debian 9 it throws exception. after that i checked this…
Ng Sharma
  • 2,072
  • 8
  • 27
  • 49
35
votes
5 answers

javax.annotation classes and Java 11 JDK

I am migrating from Java 8 to Java 11 and faced the problem. I should use: maven-compiler-plugin 2.5.1 with target 1.8 (compiling WAR in java8) tomcat9 Open JDK 11 But on startup gettings constant error: Post-processing of merged bean definition…
Sviatlana
  • 1,728
  • 6
  • 27
  • 55