Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is javac after installing new openjdk?

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?

like image 447
Jacob Avatar asked Jul 20 '15 17:07

Jacob


People also ask

Does OpenJDK include 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.

Which javac is not found?

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.

Where is javac installed Ubuntu?

Oracle Java is located at /usr/lib/jvm/java-11-oracle/jre/bin/java .

Where does Microsoft OpenJDK install?

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 .


2 Answers

On Debian, it is in the openjdk-xx-jdk-headless package.

like image 78
Gaël Bossicard Avatar answered Sep 23 '22 10:09

Gaël Bossicard


That package contains only the jre. You need the java-1.7.0-openjdk-devel package.

like image 42
Tripp Kinetics Avatar answered Sep 22 '22 10:09

Tripp Kinetics