Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying OPENSHIFT COOKBOOK
  • Table Of Contents Toc
  • Feedback & Rating feedback
OPENSHIFT COOKBOOK

OPENSHIFT COOKBOOK

By : Gulati
3.8 (6)
close
close
OPENSHIFT COOKBOOK

OPENSHIFT COOKBOOK

3.8 (6)
By: Gulati

Overview of this book

If you are a web application developer who wants to use the OpenShift platform to host your next big idea but are looking for guidance on how to achieve this, then this book is the first step you need to take. This is a very accessible cookbook where no previous knowledge of OpenShift is needed.
Table of Contents (14 chapters)
close
close
12
A. Running OpenShift on a Virtual Machine
13
Index

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 running the following command. If you already have a Java application deployed on OpenShift, then you can use that as well.

    $ rhc create-app myapp jbossas-7
    
  2. Once the application is created, you can check the default Java version by running the java...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY