An additional jdk was installed and configured on RHEL5.
yum install java-1.7.0-openjdk.x86_64
update-alternatives
It appeared to work: java -version
points to desired 1.7.
However, javac -version
still points to old 1.6.
sudo update-alternatives --config javac
only lists one option. I could not find the additional javac
.
How do I install or configure a 1.7 javac
?
Javac is not included in the OpenJDK package. You will need the JDK package from Oracle in order to get that, and other, executable java programs.
When we type the command in the Command Prompt, the prompt refuse to identify the javac command. It means that the javac.exe file is not found by the compiler. The javac.exe file exists in the bin folder of the JDK installation folder. The error we get because the PATH is not properly set.
Oracle Java is located at /usr/lib/jvm/java-11-oracle/jre/bin/java .
The JDK will be inside <location>/jdk-<version>/Contents/Home . To install using the PKG installer, open the installer and follow the instructions. By default, the JDK will be installed at /Library/Java/JavaVirtualMachines/microsoft-17. jdk/Contents/Home .
On Debian, it is in the openjdk-xx-jdk-headless package.
That package contains only the jre. You need the java-1.7.0-openjdk-devel
package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With