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

upstream connect error or disconnect/reset before headers. reset reason: connection failure. Spring Boot and java 11

I'm having a problem migrating my pure Kubernetes app to an Istio managed. I'm using Google Cloud Platform (GCP), Istio 1.4, Google Kubernetes Engine (GKE), Spring Boot and JAVA 11. I had the containers running in a pure GKE environment without a…
Victor
  • 181
  • 1
  • 1
  • 4
18
votes
3 answers

Eclipse: can't find javax.xml.datatype.XMLGregorianCalendar - Java 11

I have migrated a project from java 1.8 to java 11. In the process I have had to install a newer version of eclipse to pick up the java 11 jdk. Eclipse IDE for Enterprise Java Developers. Version: 2018-12 (4.10.0) Build id: 20181214-0600 The…
karen
  • 893
  • 2
  • 13
  • 38
18
votes
3 answers

Stream difference between Java 8 and 11

Consider this code: public static void main(String[] args) { Stream.iterate(1, i -> i + 1) .flatMap(i -> Stream.of(i, i, i)) .peek(System.out::println) .limit(4) .forEach(i -> {}); } The output in…
DodgyCodeException
  • 5,963
  • 3
  • 21
  • 42
18
votes
3 answers

Why is String.strip() 5 times faster than String.trim() for blank string In Java 11

I've encountered an interesting scenario. For some reason strip() against blank string (contains whitespaces only) significantly faster than trim() in Java 11. Benchmark public class Test { public static final String TEST_STRING = " "; // 3…
Mikhail Kholodkov
  • 23,642
  • 17
  • 61
  • 78
17
votes
3 answers

maven-plugin-plugin:3.2:descriptor failed: Index 22273 out of bounds for length 88

Jdk : JAVA 11 Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (default-descriptor) on project buildtools: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor failed:…
Gurjar Manahar
  • 181
  • 1
  • 4
17
votes
2 answers

Java 11/12 Javadoc with maven results in not generating Javadocs for tests

I have a small project with the following structure: pom.xml src/main/java/ module-info.java de.ps.pl.te/ package-info.java TE.java src/test/java/ de.ps.pl.te.test/ package-info.java TETests.java Also within my maven pom…
PowerStat
  • 3,757
  • 8
  • 32
  • 57
17
votes
9 answers

Java 11: Implementation of JAXB-API has not been found on module path or classpath

I have a little project which does throw an exception when i let it run. The problem is here (TestObject.java): final JAXBContext jaxbContext = JAXBContext.newInstance(...); I really do not understand why this throws the exception. I also created a…
J. Doe
  • 430
  • 2
  • 4
  • 11
17
votes
1 answer

Getting noclassfoundexception : java.sql.SQLException in intellij idea for jdk 11

I am using latest version of Intellij Idea and set jdk as 11. When I execute my project it throws exception noclassfoundexception : java.sql.SQLException. In java compiler settings in Intellij I have mentioned project bytecode version as 11. In…
user3592376
  • 221
  • 1
  • 3
  • 8
17
votes
2 answers

How to customise "host" header in Java http client

Here's my code: HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://127.0.0.1:8081/")) .header("Host", "test.example.com") .build(); client.send(request,…
Krzysztof Krasoń
  • 26,515
  • 16
  • 89
  • 115
16
votes
1 answer

Historic timezone offsets in newer JDK versions

I found a weird java discrepancy while testing some timezones with the use of ZonedDateTime. I was trying to parse a date before 1970 and saw that the result changes between java versions. The offset for Netherlands in 1932 is +00:19. Does anyone…
16
votes
2 answers

Unexpected OutOfMemoryError when allocating an array larger than the heap

I was playing with OOM errors today and I found something I can't explain myself. I try to allocate an array bigger than the heap, expecting a "Requested array size exceeds VM limit" error, but I get a "Java heap space" error instead. According to…
Junior Dussouillez
  • 2,327
  • 3
  • 30
  • 39
16
votes
1 answer

Java SE 11 - New Cases of Type Conversion in Java Language Specification

JLS §5.2 of Java SE 11 contains some new type conversion cases which JLS of Java 8 doesn't have, see item 4 and item 5 in the list: Assignment contexts allow the use of one of the following: an identity conversion a widening primitive conversion a…
Frank Mi
  • 452
  • 3
  • 11
16
votes
1 answer

Is it dead code in LinkedHashMap in JDK11?

I am reading LinkedHashMap source code in JDK 11 and I found a piece of dead code(I'm not sure) As we all know, LinkedHashMap use a doubly linked list to preserve the order of all the elements.It has a member called accessOrder final boolean…
DamonChiu
  • 193
  • 3
16
votes
1 answer

Java, Failed to exec spawn helper error since moving to Java 14 on linux

Just moved from Java 11 to Java 14 The following code is now failing on a linux machine: String linux_exe = System.getProperty("user.dir") + '/' + "fpcalc_arm32"; List params = new…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
16
votes
2 answers

How to fix Guice error, "An illegal reflective access operation has occurred"

I've a Kotlin project which uses Guice for DI and has recently been updated from JDK 8 -> 11. It now emits the following error at runtime: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by…
Matt R
  • 9,892
  • 10
  • 50
  • 83