13

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?

Tripp Kinetics
  • 5,178
  • 2
  • 23
  • 37
Jacob
  • 349
  • 1
  • 2
  • 12

2 Answers2

18

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

Tripp Kinetics
  • 5,178
  • 2
  • 23
  • 37
  • I just install devel package as well. i.e. another alternate OR uninstall java-1.7.0-openjdk.x86_64 first? Preferred method? – Jacob Jul 20 '15 at 20:24
  • You install the devel package as well. Don't uninstall the jre. The jdk requires the jre. – Tripp Kinetics Jul 20 '15 at 20:25
2

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