4

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
1
  • I removed the -devel suffix and it worked. See matched answer below. May 31, 2015 at 8:23

2 Answers 2

4

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
1
  • Is it possible to install without subscription?
    – digz6666
    Feb 29, 2016 at 4:17
2

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
5
  • You installed a JRE and not a JDK. May 14, 2018 at 22:27
  • @Routhinator - why do you think I "installed a JRE and not a JDK."? May 15, 2018 at 8:29
  • Because the non -devel packages on RHEL systems are JRE only. The JDK rpms have -devel May 17, 2018 at 12:10
  • So the -devel suffix means development hence JDK and not JRE? Thanks. May 17, 2018 at 13:34
  • That is correct. May 17, 2018 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.