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
1219
votes
45 answers

How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

I have some code that uses JAXB API classes which have been provided as a part of the JDK in Java 6/7/8. When I run the same code with Java 9, at runtime I get errors indicating that JAXB classes can not be found. The JAXB classes have been…
Andy Guibert
  • 41,446
  • 8
  • 38
  • 61
419
votes
12 answers

How to install OpenJDK 11 on Windows?

In the past, Oracle used to publish an executable installers for Windows that would: Unpack files Add registry keys indicating the installed version and path Add the JRE to the system PATH Register an uninstaller with Windows. As of Java 11, the…
Gili
  • 86,244
  • 97
  • 390
  • 689
347
votes
1 answer

Java 11 package javax.xml.bind does not exist

I'm trying to deserialize XML data into a Java content tree using JAXB, validating the XML data as it is unmarshalled: try { JAXBContext context = JAXBContext.newInstance("com.acme.foo"); Unmarshaller unmarshaller =…
Boris
  • 22,667
  • 16
  • 50
  • 71
257
votes
12 answers

How to install JDK 11 under Ubuntu?

So Java 11 is out. Does anybody know how to install it (OpenJDK from Oracle) from the command line? I would like to see something like it was before for Oracle Java 10: sudo add-apt-repository ppa:linuxuprising/java sudo apt-get update sudo apt-get…
Dmitriy Dumanskiy
  • 11,657
  • 9
  • 37
  • 57
204
votes
4 answers

Difference between String trim() and strip() methods in Java 11

Among other changes, JDK 11 introduces 6 new methods for java.lang.String class: repeat(int) - Repeats the String as many times as provided by the int parameter lines() - Uses a Spliterator to lazily provide lines from the source string isBlank() -…
Mikhail Kholodkov
  • 23,642
  • 17
  • 61
  • 78
201
votes
4 answers

Why is the Java 11 base Docker image so large? (openjdk:11-jre-slim)

Java 11 is announced to be the most recent LTS version. So, we're trying to start new services based on this Java version. However, the base Docker image for Java 11 is much larger than the equivalent for Java 8: openjdk:8-jre-alpine: 84…
radistao
  • 14,889
  • 11
  • 66
  • 92
193
votes
36 answers

Error: Java: invalid target release: 11 - IntelliJ IDEA

I am trying to build an application which was built using java 8, now it's upgraded to java 11. I installed Java 11 using an oracle article in my windows machine and I use IntelliJ IDEA 2017 as my IDE. I changed my system environment variables and…
AMagic
  • 2,690
  • 3
  • 21
  • 33
178
votes
11 answers

Unable to compile simple Java 10 / Java 11 project with Maven

I have a trivial Maven project: src └── main └── java └──…
ZhekaKozlov
  • 36,558
  • 20
  • 126
  • 155
175
votes
12 answers

How to avoid "Sharing is only supported for boot loader classes because bootstrap classpath has been appended" warning during debug with Java 11?

Recently I switched to the Java 11 and start to debug my app and saw this message: OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended Found only this commit and…
Dmitriy Dumanskiy
  • 11,657
  • 9
  • 37
  • 57
106
votes
15 answers

Spring Boot 2.6.0 / Spring fox 3 - Failed to start bean 'documentationPluginsBootstrapper'

I'm trying to initiate a Spring Boot project using OpenJDK 15, Spring Boot 2.6.0, Springfox 3. We are working on a project that replaced Netty as the web server and used Jetty instead, because we do not need a non-blocking environment. In the code…
jvacaq
  • 1,429
  • 2
  • 12
  • 19
103
votes
2 answers

Is there any need to switch to modules when migrating to Java 9 or later?

We're currently migrating from Java 8 to Java 11. However, upgrading our services was less painful, than we anticipated. We basically only had to change the version number in our build.gradle file and the services were happily up and running. We…
Younes El Ouarti
  • 2,200
  • 2
  • 20
  • 31
101
votes
7 answers

IntelliJ can't recognize JavaFX 11 with OpenJDK 11

I'm having trouble getting IntellJ to recognize JavaFX packages. With a new JavaFX project, with OpenJDK 11, when trying to build the project, IntelliJ can't recognize the JavaFX packages. I've imported openjfx:javafx-base-11 from the Maven…
AlwaysNeedingHelp
  • 1,851
  • 3
  • 21
  • 29
93
votes
11 answers

Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 10

In my build.gradle file I upgraded the version of one dependency (namely: com.db:microservice-commons). After loading the gradle changes, I get the following error message: > Build file…
Thomas_SO
  • 1,883
  • 2
  • 10
  • 20
90
votes
5 answers

Java 11 application as lightweight docker image

Inspired by question Why is the Java 11 base Docker image so large? (openjdk:11-jre-slim) I found that this topic in Java world is still not settled. As for 07 Dec 2018 there are common issues/pitfalls (discussed in the ticket above): JRE is not…
radistao
  • 14,889
  • 11
  • 66
  • 92
84
votes
4 answers

How can I get Java 11 run-time environment working since there is no more JRE 11 for download?

Java 11 does not come with a JRE for download, unlike past Java versions. I got an error "no java run-time environment" when running some Java-based software. To fix the problem, I had to install Java 8 JRE. How can I get my PC to run Java 11 JRE…
user3848207
  • 3,737
  • 17
  • 59
  • 104
1
2 3
99 100