I have need of installing a Java 7 development environment on a RHEL 6.3 (system details are below). Following the official OpenJDK directions I tried yum install java-1.7.0-openjdk-devel (as root). This yields the error message:

No package java-1.7.0-openjdk-devel available.

The Java6 JDK java-1.6.0-openjdk-devel and the Java7 JRE java-1.7.0-openjdk are both available, but the Java7 JDK does not appear.

Is there a non-default repository from which I can install this? If so what is it?

  • Distribution: Red Hat Enterprise Linux Server release 6.3 (Santiago)
  • Kernel: 2.6.32-279.5.2.el6.x86_64
  • I removed the -devel suffix and it worked. See matched answer below. – AlikElzin-kilaka May 31 '15 at 8:23

The package you are looking for is in the Red Hat Enterprise Linux Server Optional channel which may not be enabled.

Try this:

# yum repolist all
# yum-config-manager --enable rhel-6-server-optional-rpms
| improve this answer | |
  • Is it possible to install without subscription? – digz6666 Feb 29 '16 at 4:17

I removed the -devel and it worked:

yum install java-1.7.0-openjdk

If you already have another java version installed, don't forget to configure the system so that the new version will be used:

alternatives --config java
| improve this answer | |
  • You installed a JRE and not a JDK. – Routhinator May 14 '18 at 22:27
  • @Routhinator - why do you think I "installed a JRE and not a JDK."? – AlikElzin-kilaka May 15 '18 at 8:29
  • Because the non -devel packages on RHEL systems are JRE only. The JDK rpms have -devel – Routhinator May 17 '18 at 12:10
  • So the -devel suffix means development hence JDK and not JRE? Thanks. – AlikElzin-kilaka May 17 '18 at 13:34
  • That is correct. – Routhinator May 17 '18 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.