Top "Java-11" questions

Use this tag for questions specific to Java 11, which is version 11 of the Java platform, released on 25 September 2018.

JDK 11.0.2 compilation fails with javac NPE on anonymous parameterized class type inference

Code (spring-web 5.1.2) public static void main(String[] args) { RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); headers.set(HttpHeaders.AUTHORIZATION, "…

java javac type-inference java-11 compiler-bug
Paths.get vs Path.of

As far as I can tell, Paths.get and Path.of seem to do exactly the same thing, turning one …

java java-11
How to tell compiler to use openjdk 11 via pom.xml

How to configure OpenJDK 11 in pom file. <properties> <maven.compiler.plugin.version>3.8.0</maven.compiler.plugin.…

java maven java-11 maven-compiler-plugin
How to log request/response using java.net.http.HttpClient?

The HttpClient introduced experimentally in Java 9 is now stable in Java 11, but not surprisingly, very few projects seem to actually …

java logging java-9 java-11 java-http-client
Why is Java 14 not LTS?

Java 14 is non-LTS. Given the new release train of 6 monthly releases and that 8 and 11 were LTS, should Java 14 not have …

java java-8 java-11 java-14 lts
JAXB ClassNotFoundException Building Spring Boot App 2.2.0 with Java 11

I've created a Spring Boot application using version 2.2.0.BUILD-SNAPSHOT with Java 11 (POM below): <?xml version="1.0" encoding="UTF-8"?> <…

java spring-boot jaxb java-11
Maven surefire and JDK 11

I'm trying to get Maven surefire to run under JDK 11 but I keep getting these errors: If I set reuseForks …

java maven testing maven-surefire-plugin java-11
Tomcat 9.0.16 : Failed to initialize component [Connector[HTTP/1.1-8080]]

Recently I have downloaded JDK 11.0.2 & Tomcat 9.0.16 and set the environment variables, but whenever I am starting the tomcat it …

java tomcat java-11 tomcat9
Sonar scanner with Maven and JDK 11

I can make Sonar scanner work with OpenJDK 8 but not with OpenJDK 11. The Maven command used is: mvn clean org.…

sonarqube maven-3 sonarqube-scan sonar-runner java-11
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 …

java jackson java-11 java-http-client