5
   yum install -y java-1.7.0

   yum install -y java-1.7.0-openjdk.x86_64

   yum install -y java-1.7.0-openjdk-devel

I have referred few more and this Link. There is a comment openjdk.x86_64 installs only jre. I don't find the exact differences of these three stats? Any Suggestions?

When i try third one in centos 6, it return code 1. But second one get succeeded.

Gibbs
  • 395
  • 2
  • 5
  • 12

1 Answers1

4

Look at http://mirror.centos.org/centos/6/os/x86_64/Packages/ and you'll find out, what is possibly installable (unless you have added more repositories, of course).

Now

  • java-1.7.0-openjdk.x86_64 is the package containing the JRE

  • java-1.7.0-openjdk-devel contains the development stuff (basically things you should not need, if you only want to run Java applications).

  • java-1.7.0 could be a meta-package (that's my guess at least), that pulls in the first one and probably some other stuff which is often used together with it. This is usually the way to make sure that users get what they usually want, if the only thing they know is that they want to "install Java 7".

peterph
  • 30,520
  • 2
  • 69
  • 75