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

how to solve Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException migrating to Java 11(Openjdk-11.0.1 )

I have installed OpenJDK 11.0.1 and when i try to run my application using mvn install, i get the following error, i have added the necessary dependency as fix by adding javax.xml.bind to my pom.xml but it doesn't seem to work, anybody faced this…
Ipkiss
  • 721
  • 2
  • 15
  • 27
12
votes
1 answer

JAXB ClassNotFoundException Building Spring Boot App 2.2.0 with Java 11

I've created a Spring Boot application using version 2.2.0.BUILD-SNAPSHOT with Java 11 (POM below):
Orby
  • 428
  • 1
  • 9
  • 24
12
votes
4 answers

JavaFX Modular Application, java.lang.module.FindException: Module javafx.controls not found (Java 11, Intellij)

I have a problem with my modular JavaFX application. I created a JavaFX project and added the JavaFX lib and JavaFX modules get recognized. However, I keep getting these error message: Error occurred during initialization of boot…
rizky ramadhan
  • 157
  • 1
  • 2
  • 6
12
votes
2 answers

Package 'com.example' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base'

In module-info.java i get the error Package 'com.example' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base'. Not only does the migration (Java 8 to Java 11) frustrate me slowly but surely, this error does not make any sense…
Hannes
  • 5,002
  • 8
  • 31
  • 60
12
votes
1 answer

Replace access to sun.misc.VM for JDK 11

In OpenJDK 8, it was possible to access sun.misc.VM and call isDirectMemoryPageAligned and maxDirectMemory. isDirectMemoryPageAligned is used to size correctly the direct memory to allocate, as done by DirectByteBuffer. maxDirectMemory is used to…
Kineolyan
  • 723
  • 8
  • 24
12
votes
3 answers

Does Java HTTP Client handle compression

I tried to find any mention of handling of compression in new Java HTTP Client but failed. Is there a built-in configuration to handle for e.g. gzip or deflate compression? I would expect to have a BodyHandler for e.g. something like…
Krzysztof Krasoń
  • 26,515
  • 16
  • 89
  • 115
12
votes
2 answers

Generate JAX-WS classes from WSDL file using Maven plugin with Java11

In Java 11, JAX-WS has been removed from the JDK. It prevents to generate easily JAX-WS classes with a Maven plugin using wsimport under the hood. I am using the following configuration for the Maven plugin…
Nicolas Henneaux
  • 11,507
  • 11
  • 57
  • 82
12
votes
2 answers

JavaFX module javafx.graphics

Upon fixing a requires issue with robot.awt I've now encountered another problem upon running my application. Application builds with no issues. Stack trace : Exception in Application constructor Exception in thread "main"…
exceptionsAreBad
  • 573
  • 2
  • 5
  • 17
12
votes
1 answer

Java 11 + Chrome/Firefox = TLS decrypt error

I'm currently migrating some server software from Java 8 to Java 11. Everything works fine except for the fact that TLS connections are refused when my server runs on Java 11 (and only 11). I.e., everything works when running on up to and including…
12
votes
2 answers

Spring-Boot multi module unable to read properties file from another module

I have searched High and low and still I am unable to find a simple answer to this very annoying problem, I have followed this great guide: JWT with multi service app Everything works great but in the end of the guide we are suggested to create a…
Roie Beck
  • 1,113
  • 3
  • 15
  • 30
12
votes
2 answers

In jshell-11, why does a redeclared reference variable that resets to null still have a type?

When redeclaring Integer 'a' in line 33, why does jshell show the reference variable as an instance of Integer (refer to lines 38 & 39)? After the redeclaration, line 34 shows that 'a' is set to null. When 'a' is declared in line 6 but not given a…
B. Atkinson
  • 123
  • 5
12
votes
4 answers

Java 9: AES-GCM performance

I have run a simple test to measure the AES-GCM performance in Java 9, by encrypting byte buffers in a loop. The results were somewhat confusing. The native (hardware) acceleration seems to work - but not always. More specifically, When encrypting…
gidon
  • 271
  • 2
  • 8
11
votes
7 answers

Task :react-native-gradle-plugin:compileKotlin FAILED, 'compileJava' task (current target is 1.8) and 'compileKotlin' task (current target is 11)

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 936 file(s) to forward-jetify. Using 12 workers... info JS server already running. info Installing the app... > Task…
Dhanush Raja
  • 308
  • 1
  • 2
  • 8
11
votes
5 answers

JavaFX Font not being rendered correctly

public class Main extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) { primaryStage.setTitle("Hello World!"); Button btn = new…
RyuzakiSultan
  • 123
  • 1
  • 7
11
votes
1 answer

LocalDateTime to milliseconds difference in Java 8 and Java 11

I'm currently in the process of upgrading a few projects from Java 8 to Java 11 where one of the unit tests for a converter failed. Basically the problem stems from the equality check failing due to a a date precision which previously passed with…
geneqew
  • 2,401
  • 5
  • 33
  • 48