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
9
votes
2 answers

RabbitMQ client SSL handshake issue on JDK 11

We have a RabbitMQ client running and started getting the following error on SSL handshake once we switched to JDK 11: Caused by: java.io.EOFException: SSL peer shut down incorrectly Our environment is: Rabbitmq java client version: 5.7.3 OpenJDK…
Alex
  • 1,630
  • 1
  • 20
  • 31
9
votes
2 answers

Java 11: import javax.xml.ws.WebFault: "Cannot resolve symbol ws"

I'm attempting to upgrade a service to Java 11. We currently use wsdl2java (Apache CXF) to generate source code based on WSDLs. I'm doing this all via Maven. The source files generate properly based on the wsdl. Unfortunately, some of the source…
Joey
  • 760
  • 2
  • 7
  • 23
9
votes
2 answers

Unable to make public long com.sun.management.internal.OperatingSystemImpl.getOpenFileDescriptorCount()

I am getting the below error in server log in Java 11. Is there any solution for it? [2019-05-02 18:06:18 IST] [] ERROR com.codahale.metrics.ScheduledReporter [SID= UID= BGCD=] - Exception thrown from Slf4jReporter#report. Exception was…
SKR
  • 111
  • 1
  • 5
9
votes
1 answer

javax.net.ssl.SSLHandshakeException: No available authentication scheme

A google reveals a bug in jdk11.0.2 but I upgraded to jdk11.0.3 and this still exists for me. Steps to reproduce git clone https://github.com/deanhiller/webpieces.git add the line…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
9
votes
2 answers

Java 11 - Replace Spring @PostConstruct with afterPropertiesSet or using initMethod

I'm using spring applications which sometimes uses @PostConstruct for setup in code and tests It seems that annotation will be excluded from Java 11: Note that both @PostConstruct and @PreDestroy annotations are part of Java EE. And since Java EE…
Ori Marko
  • 56,308
  • 23
  • 131
  • 233
9
votes
1 answer

JShell access to variables defined outside of jshell instance

From inside jShell script, is it possible to access or register variables that are defined in code that's also creating JShell? Currently there seems to be no mechanism to either access or register a variable to Shell instance, or return none string…
Developer
  • 125
  • 6
9
votes
0 answers

Open JDK 11 HTTP/2 Handshake ServerHello java.util.NoSuchElementException

When testing the Open JDK 11 HTTP client over HTTP/2, there is a server-side error which looks like a JDK 11 bug. The test runs several threads against a Tomcat 9 server, testing that all threads use HTTP/2 and TLS1.3. The concern is that the…
user304217
  • 153
  • 6
9
votes
2 answers

Java JDK 11 Breaking Old Jars/Programs

It is to my understanding that Java JREs are backwards compatible, if you write a program in Java (JDK) 7, it will run with Java (JRE) 8. I have a couple of programs I developed in Java 8, and have .jar and EXE files that I built when I finished…
Danjo
  • 103
  • 1
  • 1
  • 5
9
votes
1 answer

Maven: How to add dependencies to modulepath in >= Java 9

Following example project a: project-a -src/main/ -java/ -test/ -Test.java module-info.java -resources ... pom.xml pom.xml:
huidube
  • 390
  • 3
  • 15
9
votes
1 answer

In Java 11 HttpClient how to solve restricted header name: Date

The following java 11 code: HttpRequest request = HttpRequest.newBuilder() .uri(uri) .header("Digest", digest) .header("Date", date) .build(); gives the following error: Exception in thread "main"…
user1120821
  • 439
  • 7
  • 18
9
votes
1 answer

Signing java 11 jar with jarsigner duplicate entry module-info.class

Hi I am new with java modules so this might be a dumb question. I was trying to sign my jar file with keystore and got the following error. user@Ubuntu:libs(master)$ jarsigner -keystore keyStoreFileName Test.jar alias Enter Passphrase for keystore:…
Coding Otaku
  • 453
  • 7
  • 17
9
votes
2 answers

maven with JDK11: javac: invalid flag: --release

I'm trying to set up a simple maven project with java 11. As I want to keep JAVA_HOME to be version 8, I'm using maven-toolchains-plugin to make maven use jdk11 for this project. While maven successfully finds a matching toolchain for jdk-11.0.1, I…
Hengrui Jiang
  • 861
  • 1
  • 10
  • 23
9
votes
3 answers

How to package app at Java 11 with non-modular dependencies

I develop and distribute a Java Swing app that uses Apache Batik and JavaCV. I've updated it through java 1.6, 7 and 8. Installers for macOS, Windows and Linux are built with Javapackager. Java 8 is end of support in Jan '19 and I can't find a…
Hamish258
  • 305
  • 2
  • 9
9
votes
1 answer

How to handle missing Swing PLAF classes in Java 11?

For some reason we use com.sun.java.swing.plaf.windows.WindowsComboBoxUI class which worked on Windows/Linux/Mac OS platforms with Java 5.0 through Java 8.0 Starting with Java 10 and Java 11 (we will stick to it as LTS) this class not visible to…
Barat Sahdzijeu
  • 1,683
  • 1
  • 18
  • 29
9
votes
3 answers

Proxy Authentication with JDK 11 HttpClient

I'm trying to use JDK 11 HttpClient to make requests through a corporate proxy which requires authentication by login and password. According to JDK's intro, I'm building an instance of client by means of: HttpClient httpClient =…
Toparvion
  • 799
  • 2
  • 9
  • 19