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
27
votes
5 answers

parallelStream() causing ClassNotFoundException with JAXB-API

In our application we sometimes get the following exception: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath. - with linked exception: [java.lang.ClassNotFoundException:…
Ethan Leroy
  • 15,804
  • 9
  • 41
  • 63
27
votes
7 answers

Close Java HTTP Client

Is there a way to close java.net.http.HttpClient to instantly release resources held by it? Internally it holds a selector, a connection pool and an Executor (when default one is used). However it does not implement Closeable/AutoCloseable.
Vladimir Petrakovich
  • 4,184
  • 1
  • 30
  • 46
26
votes
10 answers

java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector cannot access class com.sun.tools.javac.code.Symbol$

I'm trying to build the application with Java SE 11 and Gradle 7.0, and it builds using the IDE however when I try to build it using the terminal I get this error. How can I fix it. java.lang.IllegalAccessError: class…
Elen Mouradian
  • 475
  • 1
  • 8
  • 13
26
votes
5 answers

KeyCloak Server Caused by: java.lang.ClassNotFoundException: java.security.acl.Group

I'm running a KeyCloak server to authenticate users who would like to gain access to a Spring Boot/Spring Web REST API. However, an error occurs while trying to authenticate. The following works: When I access…
26
votes
4 answers

java 11 HttpClient leads to endless SSL loop

I am using the new java.net.http.HttpClient with the sendAsync method. The HttpClient is inside a Singelton and is created once like so: HttpClient.newBuilder().build() so really nothing special. Those requests can be POST or GET but I don't know…
Zarathustra
  • 2,853
  • 4
  • 33
  • 62
24
votes
3 answers

Remote debugging: No connection to Wildfly 14 on OpenJDK 11 at port 8787

I'm trying to connect my debugger to Wildlfy running on Open JDK 11. Despite Wildfly says: Listening for transport dt_socket at address: 8787 My IDE (IntelliJ IDEA CE 2018.1) claims that it doesn't get any connection: Unable to open debugger…
Sebastian S
  • 4,420
  • 4
  • 34
  • 63
24
votes
3 answers

Java 11: Executing Source File via Shebang is not working

I wanted to check out some new features of java 11 which was released two days ago. JEP 330 states that I could launch a Java-Source-Code-Program without compiling. It should also support the usage of Shebang-Files. Hence I have written this small…
mam10eks
  • 986
  • 7
  • 16
23
votes
3 answers

Deserializing JSON using Java 11 HttpClient and custom BodyHandler with Jackson halts and will not proceed

I have a problem with deserializing JSON to custom object directly using Java 11 HttpClient::send with custom HttpResponse.BodyHandler. I came across this issue while answering this SO question. Versions that I am using : OpenJDK 11 Jackson…
Michał Krzywański
  • 15,659
  • 4
  • 36
  • 63
23
votes
1 answer

Java 11 HttpClient not sending basic authentication

I wrote the following HttpClient code, and it did not result in an Authorization header being sent to the server: public static void main(String[] args) { var client = HttpClient.newBuilder() .authenticator(new Authenticator() { …
Jonathan Fuerth
  • 2,080
  • 2
  • 18
  • 21
23
votes
1 answer

problem in compile time when using "var" in jdk 11

when I use the word "var" the IDE recognize the command, but when I compile the code, it gives me an error: Error:(10, 17) java: cannot find symbol symbol: class var location: class Exp the code: public final class Exp { public static void…
Roy Ash
  • 1,078
  • 1
  • 11
  • 28
23
votes
2 answers

Eclipse 2018-09 with OpenJDK 11 on Windows 10

I just installed the OpenJDK version of the JDK 11 General-Availability Release on Windows 10. I tried to install it as a JRE in the just-released Eclipse 2018-09 (4.9.0), and a message appared in the Eclipse dialog saying: You selected a JRE that…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
22
votes
3 answers

JavaFX-11 with VSCode

I must be missing something obvious here... I am experimenting with VSCode (coming from Eclipse), but I am unable to get VSCode to see the JavaFX11 libraries. In the import statements, all references to JavaFX components are marked: [Java] The…
Brad Richards
  • 1,233
  • 3
  • 13
  • 23
22
votes
6 answers

Build and deploy javafx application using java11

I followed the steps in https://blog.jetbrains.com/idea/2013/03/packaging-javafx-2-applications-in-intellij-idea-121/ but when I try to build artifacts the as in the last step I get this error Error:Java FX Packager: Can't build artifact -…
humazed
  • 74,687
  • 32
  • 99
  • 138
22
votes
2 answers

Java 11 HTTP client asynchronous execution

I'm trying the new HTTP client API from JDK 11, specifically its asynchronous way of executing requests. But there is something that I'm not sure I understand (sort of an implementation aspect). In the documentation, it says: Asynchronous tasks and…
M A
  • 71,713
  • 13
  • 134
  • 174
21
votes
1 answer

IntStream leads to array elements being wrongly set to 0 (JVM Bug, Java 11)

In the class P below, the method test seems to return identically false: import java.util.function.IntPredicate; import java.util.stream.IntStream; public class P implements IntPredicate { private final static int SIZE = 33; @Override …
p_i
  • 313
  • 1
  • 4