I am trying to run an executable Java JAR compiled with Java 8.
I start the Kubernetes jdk8 shell:
tools.replacer@tools-bastion-02:~$ webservice --backend=kubernetes jdk8 shell If you don't see a command prompt, try pressing enter. tools.replacer@interactive:~$ tools.replacer@interactive:~$ java -version java version "1.7.0_181" OpenJDK Runtime Environment (IcedTea 2.6.14) (7u181-2.6.14-1~deb8u1) OpenJDK 64-Bit Server VM (build 24.181-b01, mixed mode)
Is it normal that in the jdk8 shell the Java version is 7 ?
On the other hand, Maven and Java compiler use the JDK8:
tools.replacer@interactive:~$ mvn -v Apache Maven 3.3.9 Maven home: /usr/share/maven Java version: 1.8.0_171, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.9.0-0.bpo.6-amd64", arch: "amd64", family: "unix" tools.replacer@interactive:~$ javac -version javac 1.8.0_171
Thanks for your help,