Java: OpenJDK vs. Sun Java JDK

We choose to use OpenJDK because we use Ubuntu Linux, and OpenJDK is the standard on Ubuntu.

There is a similar set of packages for the Sun Java JDK, which is slightly different than the OpenJDK JDK.

In general, both are likely to be fine for you. If you're a developer or you want more speed, then you may want to learn more about the differences between the JDKs.

Some Ubuntu packages depend on OpenJDK, most notably the ant build tool. For example if you do apt-get install ant this will also install the required OpenJDK packages.

How to use both OpenJDK and Sun JDK

We can use both OpenJDK and Sun JDK and switch between them by using the update-java-alternatives command:
  update-java-alternatives --set java-6-sunsudo update-java-alternatives --set java-6-sun



What's Next?

blog comments powered by Disqus