Can I install multiple versions of java on a Red Hat Enterprise Linux system?

Solution Verified - Updated -

Issue

  • Can I install multiple Java major versions on a Red Hat Enterprise Linux system?
  • I want to install OpenJDK 1.7 and OpenJDK 1.8 on RHEL? Is it possible?
  • If I install multiple versions of Java i.e java-1.8.0-openjdk and java-1.7.0-openjdk on RHEL, which would be taken as default?

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • OpenJDK/Oracle/IBM Java

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.