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

Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?

I'm trying to migrate some Java library from 'normal' JVM to android and stuck with some Java11 APIs used in the code. The first thing I already got - Java11 language features seems to work only with Canary build of Android Studio, see answer…
Xtra Coder
  • 3,389
  • 4
  • 40
  • 59
11
votes
4 answers

Error using SonarLint in Visual Studio Code (VsCode) and Java 11

I have a problem using SonarLint in visual studio code, I’ve been using very well this plugin in java 8 but arround last week, Vscode required java 11 as minimum java version and when I updated this (I keep using java 8 for my project, according to…
chavalife17
  • 162
  • 1
  • 2
  • 10
11
votes
1 answer

JDK 11 migration issue from JDK8, Illegal reflective access by com.fasterxml.jackson.module.afterburner.util.MyClassLoader

I have successfully migrated my spring boot project(running in prod env) from JDK8 to JDK11. I can build, test, package, install, deploy and everything. After starting the project from my IDE, I have the following warnings in my log, which doesn't…
Mahesh kumar
  • 119
  • 1
  • 7
11
votes
2 answers

SocketTimeout on Java 11 but not on Java 8

I have a very weird behavioural difference when my Java program is run with Java 8 and Java 11. I am using the MSGraph API (1.7.0) to make several calls to the Onedrive APIs. To make these calls, I am using 4 parallel threads for sync a lot of files…
kekolab
  • 801
  • 10
  • 24
11
votes
8 answers

syncing : Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed error in syncing.... androidstudio 3.6.1

I did not work with my Android Studio up today. when I build my project and I synced it , it said : Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: I did not change anything in the project and the language…
Y.R
  • 192
  • 1
  • 1
  • 10
11
votes
2 answers

Java-11 spring-boot deployment to google cloud error: app does not satisfy requirements for [java11]

I am working on a group project where we want to deploy a backend to Google Cloud. The backend is created with Java11, Gradle, and Spring-Boot, and deployed through GitHub with Travis to Google Cloud. The backend runs as it should at localhost with…
HaavardG
  • 211
  • 1
  • 8
11
votes
2 answers

PiTest "changed conditional boundary mutation survived" without reason?

I have a small Java 11 example with a JUnit 5 test that results in a pitest result of: changed conditional boundary → SURVIVED Main class: public final class CheckerUtils { private CheckerUtils() { super(); } public static int…
PowerStat
  • 3,757
  • 8
  • 32
  • 57
11
votes
2 answers

Build executable JAR with JavaFX11 from maven

I've made a Java app which uses Maven, JavaFX and some other dependencies. Before, it was easy to build an executable jar but since Java11 is modular and does not include JavaFX i just can't build a working one. I've already tried a lot of things…
crosf32
  • 166
  • 1
  • 4
  • 11
11
votes
5 answers

VirtualMachine.attach(pid) fails with java.io.IOException: Can not attach to current VM

After going through this discussion, I'm led to believe the option to attach to the same VM, by default has been disabled in OpenJDK11. I'm trying to upgrade a java agent to OpenJDK11, during the test cases when VirtualMachine.attach(pid) is called…
Vivek Shankar
  • 770
  • 1
  • 15
  • 37
11
votes
1 answer

Where to put JAXB dependency for compiling Android Databinding on Java 11?

I am using Android Data Binding, and while things were simple it was working very well. However, once I added a BindingAdapter annotation, my project stopped building in Android Studio with an error Execution failed for task…
Moshe Katz
  • 15,992
  • 7
  • 69
  • 116
11
votes
1 answer

How to read the body of a HttpRequest in Java 11?

In a test, I'd like to look inside the body of a HttpRequest. I'd like to get the body as a string. It seems that the only way to do that, is to subscribe to the BodyPublisher but how does that work?
progonkpa
  • 3,590
  • 9
  • 31
  • 50
11
votes
2 answers

IntelliJ IDEA not copying resources on build

My build output is out/production/classes. Java files get compiled into classes just fine and get put on out/production/classes/[packageName], but resources aren't copied. As far as I know they should go directly inside the out/production/classes…
Impulse The Fox
  • 2,638
  • 2
  • 27
  • 52
11
votes
1 answer

How to configure the DNS server java should use in jdk 9, 10 and 11

For testing we have a DNS server that will respond with dummy records. Previously we could make java use our DNS server (here it is just using local host) by…
Luke
  • 884
  • 8
  • 21
11
votes
2 answers

Connections leaking with state CLOSE_WAIT with HttpClient

We are using JDK11 java.net.http HTTP client to get data from an API. After we receive the response the connections remain opened in our server with TCP state CLOSE_WAIT, which means the client must close the connection. From RFC 793…
Evandro Pomatti
  • 13,341
  • 16
  • 97
  • 165
11
votes
1 answer

ClassCastException in Java 11 but not in Java 8 when using HashMap?

Please take a look at my code: Object longL = 2548214; Map map = new HashMap(1); map.put("LongNumber", longL); List> returnlist = new ArrayList(10); returnlist.add(map); List
RutujaG
  • 119
  • 1
  • 3