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
13
votes
4 answers

Error: Build path specifies execution environment JavaSE-10. There are no JREs installed in the workspace that are strictly compatible.

I'm having issues with setting up the JREs in my VSCode workspace. I thought the issue was correctly setting up my java.home in my settings.json but I'm still getting this error: Build path specifies execution environment JavaSE-10. There are no…
Chef1075
  • 2,614
  • 9
  • 40
  • 57
13
votes
4 answers

Switching to java 11 from java 8

I have downloaded and installed oraclejdk11 from oracle official site and modified PATH & JAVA_HOME variable in system environment variable on windows C:\Users\Aviral>javac -version javac 11.0.1 C:\Users\Aviral>java -version java version…
Aviral Ahuja
  • 205
  • 1
  • 2
  • 14
13
votes
1 answer

How to run Wildfly 14 with java 11?

I'm using Wildfly 14 and Java 11 in its runtime configuration. When I start the server I get org.jboss.modules.ModuleNotFoundException: java.se at org.jboss.modules.Module.addPaths(Module.java:1266) at…
Mark
  • 2,167
  • 4
  • 32
  • 64
13
votes
4 answers

Apache Tomcat and Java 11

I see from presentation slides, on the Apache Tomcat site, that Java 11 is in the plans but it makes reference to a Java 11 JRE, which isn't available. How will Tomcat handle not having a JRE available to install?
SAHild
  • 131
  • 1
  • 1
  • 6
13
votes
1 answer

Spring Boot fails due to a Hibernate error after migrating to JDK 11

I have just migrated to JDK 11 in order to use the latest Java LTS version. If I change the execution JRE in Eclipse from 10 to 11 (and only then), when I try to run my tests, I get the following exception stacktrace (I removed some parts to…
Pantelis Natsiavas
  • 5,293
  • 5
  • 21
  • 36
13
votes
2 answers

Java11 / JavaFX and Maven will not run outside of NetBeans IDE 9

As per JavaFX deployment library not found in active JDK I used José Pereda Maven approach and it works well in NetBeans but as soon as I try and run it outside with "java -jar mavenproject1-1.0-SNAPSHOT-jar-with-dependencies.jar" I get the…
Mathew Dusome
  • 305
  • 3
  • 9
13
votes
7 answers

how to make multiple line string to single line string?

I have below string String str="select * from m_menus; select * from m_roles"; I want above string in one line like String str="select * from m_menus;select * from m_roles"; I have tried str1=str.replace("[\r\n]+", " "); and…
happy
  • 2,550
  • 17
  • 64
  • 109
12
votes
4 answers

How to compile OpenJDK 11 on an M1 Macbook?

I want to compile the OpenJDK 11 for an M1 MacBook. First, I tried to use the Zulu JDK, but I did not find out a way to compile it. Then, I tried to try compile OpenJDK on an M1, but this reports an error when I run sh configure. The error…
rainbowecho
  • 145
  • 1
  • 1
  • 9
12
votes
1 answer

How should javac 11 link methods overridden in later versions with a Java 8 target?

Let's say I'm using Java 11 javac, but I'm using the --source and --target options set to 1.8 so that my source code will be considered Java 8 and the output .class files will be compatible with Java 8. My goal is to produce .class files that can…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
12
votes
1 answer

NoClassDefFoundError: org/w3c/dom/ls/DocumentLS - issue occurring only on deployment after having fixed it on compile time

Background I have a project where I parse some XML documents and I happened to need the xerces dependency: xerces xerces 2.4.0 While writing the…
Matteo NNZ
  • 11,930
  • 12
  • 52
  • 89
12
votes
3 answers

Access `sun.security.x509` in JDK 11 without modules?

(tl,dr at the end) We have a small method that generates self-signed SSL certificate and it obviously depends on sun.security.x509. Currently we are still building it using JDK8 because of that, even though the rest of the codebase (it's only small,…
Wojtek
  • 1,845
  • 1
  • 14
  • 33
12
votes
1 answer

package sun.awt does not exist

When compiling with ant, calls to sun.awt.AppContext work, however the same code compiled with IntelliJ fails using AdoptOpenJDK11. sun.awt.AppContext with Oracle JDK8 works with IntelliJ sun.awt.AppContext with AdoptOpenJDK11 does NOT work with…
tresf
  • 7,103
  • 6
  • 40
  • 101
12
votes
1 answer

Spring boot microservice (jdk11) threw hystrix.stream-actuator-endpoint exception

After spring boot service migration to 2.1.3.RELEASE and jdk11, hystrix stream actuator-related exceptions occur. The exception is ERROR org.apache.catalina.core.ContainerBase.[Tomcat-1].[localhost].[/].[hystrix.stream-actuator-endpoint] -…
yevtsy
  • 564
  • 1
  • 6
  • 18
12
votes
8 answers

Flyway can't find classpath:db/migrations

I just started right now a new project in Intellij using Spring Boot ver 2.1.3 and Flyway 5.2.4 with Java 11. After try to start my project i got : Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name…
Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92
12
votes
4 answers

Create standalone Java executable for different platforms without installation

I have created a Java application runtime image using jlink. I would like to be able to ship the software as an executable to different platforms. (Preferably by building on one platform, like cross-compiling.) Ideally, it would be a single…
NeradaXsinZ
  • 137
  • 1
  • 7