3,168 questions
1293 votes
46 answers
1.6m views
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 ...
438 votes
12 answers
673k views
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 ...
379 votes
1 answer
682k views
Java 11 package javax.xml.bind does not exist [duplicate]
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"); ...
276 votes
12 answers
667k views
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:...
252 votes
11 answers
333k views
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 ...
237 votes
5 answers
141k views
Difference between String trim() and strip() methods
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 ...
205 votes
5 answers
170k views
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 ...
202 votes
36 answers
460k views
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....
181 votes
11 answers
371k views
Unable to compile simple Java 10 / Java 11 project with Maven
I have a trivial Maven project: src └── main └── java └── module-info.java pom.xml pom.xml: <groupId>org.example</groupId> <artifactId>example</artifactId> <...
149 votes
11 answers
204k views
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 'C:\...
112 votes
15 answers
167k views
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 ...
110 votes
2 answers
16k views
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 ...
104 votes
7 answers
170k views
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 ...
95 votes
1 answer
270k views
Where is JRE 11? [duplicate]
UPDATE: (to be more clear) You can find JRE 8, JRE 9 and JRE 10 on Oracle's official website (click on each). But where is JRE 11?! Also, JDK 11 doesn't include a JRE. I was expecting JRE to be ...
94 votes
5 answers
92k views
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/...