O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Choosing between Java 6 and Java 7

OpenShift supports both Java 6 and Java 7 to run your applications. By default, all the Java applications use OpenJDK 7, but you can configure your application to use OpenJDK 6 as well. To get the exact version of your Java installation, you can SSH into the application gear and run the java -version command or run the following command:

$ rhc ssh --app jobstore --command "java -version"

In this recipe, you will learn how you can choose among different supported versions of Java.

Note

This recipe will work with all the four supported Java cartridges (Apache Tomcat 6, Apache Tomcat 7, JBoss AS7, and JBoss EAP).

How to do it…

Perform the following steps to switch to OpenJDK 6:

  1. Create a new JBoss AS 7 application by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required