I've been tasked to work on updating a Java program that hasn't been touched for years and I'm running into issues building it using the latest version of Java OpenJDK 126.96.36.199-2 on Centos 7. When I run the
$ make all command to start compiling the Java program I get a
/bin/sh: javac: command not found error message.
I've edited the
.bash_profile file in my home directory and added:
$ source .bash_profile to make the changes take effect and verified using
echo $JAVA_HOME which gives me the expected output, but still no luck.
So far I'm only able to successfully build the program when Java OpenJDK 1.8 is installed along with with the additional javac repository.
alternatives --display javac I get this on the final line:
Current `best' version is /usr/lib/jvm/java-1.7.0-openjdk 188.8.131.521-184.108.40.206.el7_8.x86_64/bin/javac.
This is strange to me as I have not installed Java OpenJDK V1.7 on my system
alternatives --display java I get this on the final line:
Current `best' version is /usr/lib/jvm/java-14-openjdk-220.127.116.11-2.rolling.el7.x86_64/bin/java.
Any suggestions on where I'm going wrong would be much appreciated.