S2tbx installation error - problems with openjdk 10?

Hi there,
I’m trying to install s2tbx on my linux system. SNAP with s1tbx is already working fine. I downloaded s2tbx, opened the folder and typed:

manu@rafi:~/snap/s2tbx$ mvn install

and I get this error:

Failed to execute goal on project s2tbx-preferences-ui: Could not resolve dependencies for project org.esa.s2tbx:s2tbx-preferences-ui:nbm:7.0.0-SNAPSHOT: Could not find artifact com.oracle:tools:jar:1.8.0 at specified path /usr/lib/jvm/java-10-openjdk-amd64/…/lib/tools.jar -> [Help 1]

My Java version is:

manu@rafi:~$ java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Debian-1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Debian-1, mixed mode)

Thanks for your help!

Yes, you need the Oracle JDK, version 8.

Thanks marpet! I switched to openjdk 8. But I still get same error. When I run mvn with -X flag, it shows errors like:

[…]
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.esa.s2tbx:s2tbx-preferences-ui:nbm:7.0.0-SNAPSHOT: Could not find artifact com.oracle:tools:jar:1.8.0 at specified path /usr/lib/jvm/java-8-openjdk-amd64/jre/…/lib/tools.jar
[…]
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact com.oracle:tools:jar:1.8.0 at specified path /usr/lib/jvm/java-8-openjdk-amd64/jre/…/lib/tools.jar

I guess I have to correct a Java PATH variable somehow. Any ideas?

Probably you have the JAVA_HOME environment variable set.
Please have a look at the bottom of this maven page:

https://maven.apache.org/install.html

Ok, it works! I reinstalled maven after switching to openjdk 8 and everything is fine. Thanks!