Maven: Invalid target release: 10

Same problem fixed for me by setting JAVA_HOME environment variable to point to the JDK with right version. My source and destination java version in maven-compiler-plugin were 11, java -version was also on version 11, but my JAVA_HOME was pointing to JDK-1.8. Check JAVA_HOME again by using a terminal instead of IDE: Linux: echo $JAVA_HOME … Read more

How to install JDK 10 under Ubuntu?

[*] Update: JDK 11 Now Available sudo apt-get install openjdk-11-jdk For JDK 10 Option 1: Easy Installation (PPA) sudo add-apt-repository ppa:linuxuprising/java sudo apt-get update sudo apt-get install oracle-java10-installer Then set as default with: sudo apt-get install oracle-java10-set-default And finally verify Installation with: $ java -version java version “10.0.1” 2018-04-17 Java(TM) SE Runtime Environment 18.3 (build … Read more

Eclipse can’t find XML related classes after switching build path to JDK 10

I assume that the project being migrated from Java 1.8 still has no module-info.java. This implies you are compiling code in the “unnamed module”. Code in the unnamed module “reads” all observable named and unnamed modules, in particular it reads module “java.xml” from the JRE System Library. This module exports package like java.xml.xpath. Additionally, you … Read more

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

As of 30Jul, 2018 to fix the above issue, one can configure the java version used within maven to any up to JDK/11 and make use of the maven-compiler-plugin:3.8.0 to specify a release of either 9,10,11 without any explicit dependencies. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <release>11</release> <!–or <release>10</release>–> </configuration> </plugin> Note:- The default value for … Read more

Why does array[idx++]+=”a” increase idx once in Java 8 but twice in Java 9 and 10?

This is a bug in javac starting from JDK 9 (which made some changes with regard to string concatenation, which I suspect is part of the problem), as confirmed by the javac team under the bug id JDK-8204322. If you look at the corresponding bytecode for the line: array[i++%size] += i + ” “; It … Read more

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

The JAXB APIs are considered to be Java EE APIs and therefore are no longer contained on the default classpath in Java SE 9. In Java 11, they are completely removed from the JDK. Java 9 introduces the concepts of modules, and by default, the java.se aggregate module is available on the classpath (or rather, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)