Web lists-archives.com

java, javac versions not the same, apt-get doesn't help ...




java gives you error messages when you compile and run code with
different versions of the JVM

while trying to update my box using apt-get I am getting:
"openjdk-8-jdk is already the newest version."

How do you make sure you install the same version of both java and
javac using apt-get?

lbrtchx
~
$ uname -a
Linux IBMThnkPdT60 3.16.0-4-686-pae #1 SMP Debian 3.16.36-1+deb8u1
(2016-09-03) i686 GNU/Linux

$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-1~bpo8+1-b11)
OpenJDK Server VM (build 25.131-b11, mixed mode)

$ javac -version
javac 1.7.0_111


# _LOG_FL="openjdk-8-jdk_install_$(date +%Y%m%d%H%M%S).log"

# uname -a >> "${_LOG_FL}" 2>&1

# time(apt-get -V install openjdk-8-jdk) >> "${_LOG_FL}" 2>&1

# cat openjdk-8-jdk_install_20180112040601.log
Linux IBMThnkPdT60 3.16.0-4-686-pae
#1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) i686 GNU/Linux

Reading package lists...
Building dependency tree...
Reading state information...
openjdk-8-jdk is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 365 not upgraded.

real    0m3.571s
user    0m0.672s
sys     0m0.092s

# java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-1~bpo8+1-b11)
OpenJDK Server VM (build 25.131-b11, mixed mode)

# javac -version
javac 1.7.0_111