<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Salter&#039;s Blog</title>
	<atom:link href="http://davidsalter.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidsalter.com</link>
	<description>a blog about stuff, but mainly curly bracket development...</description>
	<lastBuildDate>Tue, 09 Apr 2013 11:16:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Developing Java EE 6 Applications With TomEE and NetBeans</title>
		<link>http://davidsalter.com/2013/04/developing-java-ee-6-applications-with-tomee-and-netbeans/</link>
		<comments>http://davidsalter.com/2013/04/developing-java-ee-6-applications-with-tomee-and-netbeans/#comments</comments>
		<pubDate>Mon, 08 Apr 2013 20:49:01 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[OpenEJB]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[TomEE]]></category>

		<guid isPermaLink="false">http://davidsalter.com/?p=253</guid>
		<description><![CDATA[I&#8217;ve found that one of the most productive ways of developing Java EE applications is by using NetBeans and the TomEE application server.  For those of you that haven&#8217;t used TomEE before, it&#8217;s a Java EE 6 Web Profile certified stack that sits on top of Apache Tomcat. As TomEE is Java EE 6 web [...]<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/about/"     class="crp_title">About</a></li><li><a href="http://davidsalter.com/2011/06/vmware-introduces-vfabric-5-an-integrated-application-platform-for-virtual-and-cloud-environments/"     class="crp_title">VMware Introduces vFabric 5, an Integrated Application&hellip;</a></li><li><a href="http://davidsalter.com/2011/12/using-glassfish-from-eclipse/"     class="crp_title">Using GlassFish from Eclipse</a></li><li><a href="http://davidsalter.com/2011/07/forthcoming-book-reviews/"     class="crp_title">Forthcoming Book Reviews</a></li><li><a href="http://davidsalter.com/2012/02/review-of-jboss-as-7-configuration-deployment-and-administration/"     class="crp_title">Review of JBoss AS 7 Configuration, Deployment and&hellip;</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve found that one of the most productive ways of developing Java EE applications is by using <a href="https://netbeans.org/">NetBeans</a> and the <a href="http://tomee.apache.org/index.html">TomEE</a> application server.  For those of you that haven&#8217;t used TomEE before, it&#8217;s a Java EE 6 Web Profile certified stack that sits on top of Apache Tomcat.</p>
<p>As TomEE is Java EE 6 web profile certified, it supports the following technologies (all via Apache products) out of the box:</p>
<ul>
<li>CDI</li>
<li>EJB</li>
<li>JPA</li>
<li>JSF</li>
<li>JSP</li>
<li>JSTL</li>
<li>JTA</li>
<li>Servlet</li>
<li>Javamail</li>
<li>Bean Validation</li>
</ul>
<p>If you want / need to use JMS or JAX-RS/WS, then there&#8217;s an additional distribution called TomEE+ that provides support for these features.</p>
<p>I prefer to use Maven for project management / builds / testing etc which integrates well with NetBeans.</p>
<p>Using NetBeans, you can easily create a TomEE compatible Maven project by creating a new Maven Project from Archetype within the NetBeans New Project wizard.</p>
<p><a href="http://i2.wp.com/davidsalter.com/wp-content/uploads/2013/04/maven.png"><img class="aligncenter size-full wp-image-254" alt="Maven" src="http://i2.wp.com/davidsalter.com/wp-content/uploads/2013/04/maven.png?resize=625%2C376" data-recalc-dims="1" /></a></p>
<p>The &#8220;tomee-webapp-archetype&#8221; will create a basic Web Application that&#8217;s defined and ready to deploy against TomEE.</p>
<p>Within the generated pom.xml file, we can see the important TomEE specific aspects are the use of OpenEJB for the EE api&#8217;s</p>
<pre class="brush: xml; title: ; notranslate">
&lt;dependency&gt;
      &lt;groupId&gt;org.apache.openejb&lt;/groupId&gt;
      &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
      &lt;version&gt;6.0-4&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
&lt;/dependency&gt;
</pre>
<p>and the use of the TomEE Maven plugin</p>
<pre class="brush: xml; title: ; notranslate">
&lt;plugin&gt;
        &lt;groupId&gt;org.apache.openejb.maven&lt;/groupId&gt;
        &lt;artifactId&gt;tomee-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.0.1&lt;/version&gt;
&lt;/plugin&gt;
</pre>
<p>Using the TomEE Maven plugin allows the project to be built and deployed to TomEE (without having to download TomEE!).  This is useful for building and compiling from the command line.  To get Maven to download TomEE, deploy your project to it and then start TomEE up, use the command</p>
<pre class="brush: bash; title: ; notranslate">
mvn tomee:run
</pre>
<p>Having said that, I prefer to use NetBeans to control running my projects as this provides more advanced features such as hot deployment of JSP/JSF, controlled execution of tests etc.</p>
<p>To run the project from within NetBeans, simply open up the pom.xml from the File | Open Project wizard in NetBeans.  NetBeans is clever enough to open Maven projects which then function just like a standard NetBeans project.  Select the &#8220;Run&#8221; option and NetBeans will ask which application server to run the application on.  The is no direct support for TomEE, (i.e. you don&#8217;t see an Application Server of type TomEE in the NetBeans server configuration page) but since TomEE is based on Tomcat, to define a TomEE server, you just need to create a &#8220;Apache Tomcat&#8221; server and specify the server location to that of a previously downloaded TomEE instance.</p>
<p>That&#8217;s pretty much all that is involved in getting up and running with TomEE and NetBeans.  TomEE offers a fast Java EE 6 certified stack that provides for rapid development and deployment of applications, whereas NetBeans 7.3 provides excellent tooling to support TomEE and Java EE development.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/about/"     class="crp_title">About</a></li><li><a href="http://davidsalter.com/2011/06/vmware-introduces-vfabric-5-an-integrated-application-platform-for-virtual-and-cloud-environments/"     class="crp_title">VMware Introduces vFabric 5, an Integrated Application&hellip;</a></li><li><a href="http://davidsalter.com/2011/12/using-glassfish-from-eclipse/"     class="crp_title">Using GlassFish from Eclipse</a></li><li><a href="http://davidsalter.com/2011/07/forthcoming-book-reviews/"     class="crp_title">Forthcoming Book Reviews</a></li><li><a href="http://davidsalter.com/2012/02/review-of-jboss-as-7-configuration-deployment-and-administration/"     class="crp_title">Review of JBoss AS 7 Configuration, Deployment and&hellip;</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://davidsalter.com/2013/04/developing-java-ee-6-applications-with-tomee-and-netbeans/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cannot play DVD in Ubuntu</title>
		<link>http://davidsalter.com/2012/09/cannot-play-dvd-in-ubuntu/</link>
		<comments>http://davidsalter.com/2012/09/cannot-play-dvd-in-ubuntu/#comments</comments>
		<pubDate>Fri, 21 Sep 2012 06:37:19 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[libdvdread]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://davidsalter.com/?p=180</guid>
		<description><![CDATA[Yesterday I was trying to view a DVD on Ubuntu, but was getting an error stating that the DVD was encrypted, but there was no DVD decryption library available. It turns out that its easy to add the relevant decryption libraries as this link describes. From a terminal window, the steps to getting the relevant software installed [...]<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/2012/03/creating-a-shortcut-to-eclipse-on-the-ubuntu-unity-dock/"     class="crp_title">Creating a Shortcut to Eclipse on the Ubuntu Unity Dock</a></li><li><a href="http://davidsalter.com/2012/03/choosing-a-java-version-on-ubuntu/"     class="crp_title">Choosing a Java Version on Ubuntu</a></li><li><a href="http://davidsalter.com/2012/03/hosting-wordpress-on-openshift/"     class="crp_title">Hosting WordPress On OpenShift</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>Yesterday I was trying to view a DVD on Ubuntu, but was getting an error stating that the DVD was encrypted, but there was no DVD decryption library available.</p>
<p>It turns out that its easy to add the relevant decryption libraries as this <a href="https://answers.launchpad.net/ubuntu/+source/gnome-media/+question/158349">link</a> describes.</p>
<p>From a terminal window, the steps to getting the relevant software installed to play a DVD are:</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo apt-get install ubuntu-restricted-extras
$ sudo /usr/share/doc/libdvdread4/install-css.sh
</pre>
<p>After executing those commands, you should be able to play DVDs correctly.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/2012/03/creating-a-shortcut-to-eclipse-on-the-ubuntu-unity-dock/"     class="crp_title">Creating a Shortcut to Eclipse on the Ubuntu Unity Dock</a></li><li><a href="http://davidsalter.com/2012/03/choosing-a-java-version-on-ubuntu/"     class="crp_title">Choosing a Java Version on Ubuntu</a></li><li><a href="http://davidsalter.com/2012/03/hosting-wordpress-on-openshift/"     class="crp_title">Hosting WordPress On OpenShift</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://davidsalter.com/2012/09/cannot-play-dvd-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the ShrinkWrap Maven Resolver for Arquillian Tests</title>
		<link>http://davidsalter.com/2012/04/using-the-shrinkwrap-maven-resolver-for-arquillian-tests/</link>
		<comments>http://davidsalter.com/2012/04/using-the-shrinkwrap-maven-resolver-for-arquillian-tests/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 07:02:44 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Arquillian]]></category>
		<category><![CDATA[Shrinkwrap]]></category>

		<guid isPermaLink="false">http://davidsalter.com/?p=187</guid>
		<description><![CDATA[This post assumes that you&#8217;re familiar with using Arquillian for testing Java applications. If you’re not familiar with Arquillian, then I suggest you check out the guides at http://www.arquillian.org/ where you’ll learn how to write Java tests that can run on the server and are much easier to write and maintain. When writing an Arquillian test, you [...]<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/2013/04/developing-java-ee-6-applications-with-tomee-and-netbeans/"     class="crp_title">Developing Java EE 6 Applications With TomEE and NetBeans</a></li><li><a href="http://davidsalter.com/2011/06/spring-3-1-0-m2-released/"     class="crp_title">Spring 3.1.0 M2 Released</a></li><li><a href="http://davidsalter.com/2011/07/jboss-as-6-released-with-support-for-java-ee-6-web-profile/"     class="crp_title">JBoss AS 6 Released with support for Java EE 6 Web Profile</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p><a href="http://i2.wp.com/davidsalter.com/wp-content/uploads/2013/02/arquillian.png"><img class="alignleft size-full wp-image-185" style="margin: 0px 20px 0px 0px; float: left;" alt="arquillian" src="http://i2.wp.com/davidsalter.com/wp-content/uploads/2013/02/arquillian.png?resize=200%2C74" data-recalc-dims="1" /></a>This post assumes that you&#8217;re familiar with using Arquillian for testing Java applications. If you’re not familiar with Arquillian, then I suggest you check out the guides at <a href="http://www.arquillian.org/">http://www.arquillian.org/</a> where you’ll learn how to write Java tests that can run on the server and are much easier to write and maintain.</p>
<p>When writing an Arquillian test, you create a deployment as in the following code sample:</p>
<pre class="brush: java; title: ; notranslate">
@Deployment
public static Archive&lt;?&gt; createTestArchive() {
    return ShrinkWrap.create(JavaArchive.class, &quot;test.jar&quot;)
    .addClasses(RandomNumberBean.class);
}
</pre>
<p>It’s not uncommon to see a lot of calls to .addClasses() or .addPackages(). When working with third party libraries, this list of classes/packages added to the archive can grow and grow (and can be a bit of a trial and error process to get a complete list of dependencies). The ShrinkWrap Maven Resolver overcomes this issue by allowing you to specify Maven dependencies in the createTestArchive() method rather than having to add each class/package at a time.</p>
<p>To use the ShrinkWrap Maven Resolver, the first stage is to add the relevant dependency to you Maven project’s pom.xml file.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;dependency&gt;
    &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
    &lt;artifactId&gt;shrinkwrap-resolver-impl-maven&lt;/artifactId&gt;
    &lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;
</pre>
<p>Having configured Maven, you’re ready to go and add dependencies to your Arquillian archive via code as shown in the sample below. In this sample, I’ve added the Apache Commons Math library to the Arquillian archive.</p>
<pre class="brush: java; title: ; notranslate">
@Deployment
public static Archive&lt;?&gt; createTestArchive() {
    MavenDependencyResolver resolver = DependencyResolvers.use(
    MavenDependencyResolver.class).loadMetadataFromPom(&quot;pom.xml&quot;);
 
    return ShrinkWrap
        .create(WebArchive.class, &quot;test.war&quot;)
        .addClasses(RandomNumberBeanCommons.class)
        .addAsLibraries(
            resolver.artifact(&quot;org.apache.commons:commons-math&quot;)
        .resolveAsFiles());
}
</pre>
<p>Looking at the code, you can see that the first stage is to create a MavenDependencyResolver from the project’s pom.xml file. Then all you need to do, is invoke the .addAsLibraries() method on the Arquillian deployment specifying which Maven dependency to resolve.</p>
<p>Hopefully, you can see that this technique allows you to create your Arquillian tests much faster and more reliably than without using the ShrinkWrap Maven Resolver.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/2013/04/developing-java-ee-6-applications-with-tomee-and-netbeans/"     class="crp_title">Developing Java EE 6 Applications With TomEE and NetBeans</a></li><li><a href="http://davidsalter.com/2011/06/spring-3-1-0-m2-released/"     class="crp_title">Spring 3.1.0 M2 Released</a></li><li><a href="http://davidsalter.com/2011/07/jboss-as-6-released-with-support-for-java-ee-6-web-profile/"     class="crp_title">JBoss AS 6 Released with support for Java EE 6 Web Profile</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://davidsalter.com/2012/04/using-the-shrinkwrap-maven-resolver-for-arquillian-tests/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hosting WordPress On OpenShift</title>
		<link>http://davidsalter.com/2012/03/hosting-wordpress-on-openshift/</link>
		<comments>http://davidsalter.com/2012/03/hosting-wordpress-on-openshift/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 23:09:07 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Paas]]></category>
		<category><![CDATA[Source Control]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[OpenShift]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://davidsalter.com/?p=189</guid>
		<description><![CDATA[If you’ve not heard of OpenShift, it’s: &#8220;a free, cloud-based application platform for Java, Perl, PHP, Python, and Ruby applications.&#8221; OpenShift uses git to publish files to your site, so the general approach is to make your application locally, commit files to git and then push them to OpenShift. In practice this works very well, [...]<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/2012/02/review-of-jboss-as-7-configuration-deployment-and-administration/"     class="crp_title">Review of JBoss AS 7 Configuration, Deployment and&hellip;</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p><a href="http://i2.wp.com/davidsalter.com/wp-content/uploads/2013/02/openshift.png"><img class="alignleft size-full wp-image-190" style="margin: 0px 20px 0px 0px; float: left;" alt="OpenShift" src="http://i2.wp.com/davidsalter.com/wp-content/uploads/2013/02/openshift.png?resize=250%2C250" data-recalc-dims="1" /></a> If you’ve not heard of OpenShift, it’s:</p>
<blockquote><p><em>&#8220;a free, cloud-based application platform for Java, Perl, PHP, Python, and Ruby applications.&#8221;</em></p></blockquote>
<p>OpenShift uses git to publish files to your site, so the general approach is to make your application locally, commit files to git and then push them to OpenShift. In practice this works very well, but there are a couple of gotcha’s that I encountered – I’ll explain those later.</p>
<p>OpenShift express supports Java (with full AS7 support), Ruby, PHP, Perl and Python apps.</p>
<p>In this post, I’m going to show the steps needed to host WordPress at OpenShift Express.</p>
<p><strong>Installing the client tools</strong><br />
So, the first stage in setting up on OpenShift is to install the OpenShift client tools. On Ubuntu, this is achieved with <code>apt-get</code></p>
<pre class="brush: bash; title: ; notranslate">
$ sudo apt-get install ruby
$ sudo apt-get install rubygems
$ sudo apt-get install rhc
</pre>
<p><strong>Creating a domain and an application</strong><br />
After installing the OpenShift tools, the next stage is to create a domain name to host the application in and the application itself.</p>
<p>Creating a domain is achieved with the <code>rhc domain create</code> command.</p>
<pre class="brush: bash; title: ; notranslate">
$ rhc domain create -n &lt;domain&gt; -l &lt;emailaddress&gt;
</pre>
<p>Where <code>domain</code> is the OpenShift unique domain name for your application and <code>emailaddress</code> is your login email address for OpenShift.</p>
<p>Next, you need to create an application. This is essentially a remote git repository which is cloned onto your local filesystem. When creating an application, you need to specify which &#8220;cartridges&#8221; you want to use. For WordPress, you will need to use the php-5.3 cartridge.</p>
<pre class="brush: bash; title: ; notranslate">
$ rhc app create -a &lt;appname&gt; -t php-5.3
</pre>
<p>Where <code>appname</code> is your application name.</p>
<p>If all goes well, your application will now be created and available on the internet at:</p>
<pre class="brush: bash; title: ; notranslate">

http://&lt;appname&gt;-&lt;domain&gt;.rhcloud.com

</pre>
<p><strong>MySQL Support</strong><br />
The next stage of hosting WordPress on OpenShift is to create a MySQL database. This is again achieved using the OpenShift command tools:</p>
<pre class="brush: bash; title: ; notranslate">
$ rhc-ctl-app -a  &quot;appname&quot; -e add-mysql-5.1
</pre>
<p>This will give you MySQL support for your application. After running this command, you’ll be supplied details to your MySQL database. To help manage the database, the easiest way I found was to add PHPMyAdmin</p>
<pre class="brush: bash; title: ; notranslate">
$ rhc-ctl-app -e add-phpmyadmin-3.4 -a &quot;appname&quot;
</pre>
<p>Now that you’ve got PHPMyAdmin installed, a good security practice is to create a MySQL user with the appropriate access rights for accessing WordPress. We don’t really want WordPress running against the admin MySQL account.</p>
<p><strong>Install WordPress</strong><br />
At this point, you’ve created a basic OpenShift PHP application with MySQL support. The next stage is to install WordPress. To install, simply download the latest archive of WordPress and unzip it into the <code>php</code> folder that has been created underneath your <code>appname</code> folder.</p>
<p>After unziping, its tempting to just access the OpenShift application and run the WordPress wizard to create the standard <code>wp-config.php</code> file. Unfortunately if you do this, when you next push your local code to OpenShift, any modifications made on the server will be lost. So, the general procedure is to always make changes locally and then push them to the server. This also applies for installing plugins to WordPress – always install them locally, commit them to git and then push them to OpenShift.</p>
<p>So, to get WordPress up and running, create a <code>wp-config.php</code> file locally within the WordPress installation folder. Its a very straightforward file to create, but check out the WordPress docs for more info.</p>
<p><strong>Pushing to OpenShift</strong><br />
Having created the database configuration file, you can now commit everything to git and push it to OpenShift.</p>
<pre class="brush: bash; title: ; notranslate">
$ git commit -a -m &quot;Initial installation of WordPress&quot;
$ git push
</pre>
<p>Again, assuming everything has gone OK with no errors, you should be able to access your WordPress site at:</p>
<pre class="brush: bash; title: ; notranslate">

http://&lt;appname&gt;-&lt;domain&gt;.rhcloud.com

</pre>
<p><strong>Publishing to a custom domain</strong><br />
OpenShift has recently added support to allow applications to be hosted at their own domain names rather than as a subdomain of rhcloud.com</p>
<p>To publish to a custom domain, you need to add an <code>alias</code> in OpenShift for your application to the domain name you want it hosted at.</p>
<pre class="brush: bash; title: ; notranslate">
$ rhc-ctl-app -c add-alias --alias www.somedomain.com -a &lt;appname&gt;
</pre>
<p>To complete the process, you need to edit your DNS records and add a cname pointing your domain (e.g. www.somedomain.com) to <appname>-<domain>.rhcloud.com</p>
<p>You should now have a working WordPress installation running on OpenShift</p>
<p><strong>Uploading media to WordPress</strong><br />
One of the side effects of pushing local content to a git repository is that any changes made to the web site are lost when new code is pushed to it. For example plugins installed via the WordPress user interface are lost when you push new code to OpenShift. Also, any images uploaded to WordPress (by default stored in <code>wp-content/uploads</code>) are also lost when you push new code. To overcome this, edit the <code><appname>/.openshift/action_hooks/build</code> file and add the following contents:</p>
<pre class="brush: bash; title: ; notranslate">
if [ ! -d $OPENSHIFT_DATA_DIR/uploads ]; then
    mkdir $OPENSHIFT_DATA_DIR/uploads
fi
   
ln -sf $OPENSHIFT_DATA_DIR/uploads $OPENSHIFT_REPO_DIR/php/wp-content/
</pre>
<p>Any uploaded data will now be stored outside of the OpenShift git repository and therefore won’t be overwritten each time you push to OpenShift.</p>
<p>Hopefully I’ve shown how straightforward is is to host applications on OpenShift Express. If you’ve got any questions, leave them as comments to the post.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/2012/02/review-of-jboss-as-7-configuration-deployment-and-administration/"     class="crp_title">Review of JBoss AS 7 Configuration, Deployment and&hellip;</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://davidsalter.com/2012/03/hosting-wordpress-on-openshift/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Choosing a Java Version on Ubuntu</title>
		<link>http://davidsalter.com/2012/03/choosing-a-java-version-on-ubuntu/</link>
		<comments>http://davidsalter.com/2012/03/choosing-a-java-version-on-ubuntu/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 08:55:50 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://davidsalter.com/?p=195</guid>
		<description><![CDATA[When you have got multiple versions of Java installed, you can choose which one you want to use by running the update-alternatives command. Running this command shows a list of installed Java JDKs and JREs allowing one to be selected as the default that is used when java needs to be executed. If you prefer [...]<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/2012/09/cannot-play-dvd-in-ubuntu/"     class="crp_title">Cannot play DVD in Ubuntu</a></li><li><a href="http://davidsalter.com/2012/03/creating-a-shortcut-to-eclipse-on-the-ubuntu-unity-dock/"     class="crp_title">Creating a Shortcut to Eclipse on the Ubuntu Unity Dock</a></li><li><a href="http://davidsalter.com/2010/07/running-jboss-tools-in-eclipse-3-6-helios/"     class="crp_title">Running JBoss Tools in Eclipse 3.6, Helios</a></li><li><a href="http://davidsalter.com/2011/05/apache-tomcat-7-0-14-released/"     class="crp_title">Apache Tomcat 7.0.14 released</a></li><li><a href="http://davidsalter.com/2013/04/developing-java-ee-6-applications-with-tomee-and-netbeans/"     class="crp_title">Developing Java EE 6 Applications With TomEE and NetBeans</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>When you have got multiple versions of Java installed, you can choose which one you want to use by running the <code>update-alternatives</code> command.</p>
<p>Running this command shows a list of installed Java JDKs and JREs allowing one to be selected as the default that is used when java needs to be executed.</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo update-alternatives --config javac
</pre>
<p>If you prefer to use a gui instead of the command line, you can execute <code>galternatives</code> instead and define the default versions of software with the following dialog.</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo galternatives
</pre>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://davidsalter.com/2012/09/cannot-play-dvd-in-ubuntu/"     class="crp_title">Cannot play DVD in Ubuntu</a></li><li><a href="http://davidsalter.com/2012/03/creating-a-shortcut-to-eclipse-on-the-ubuntu-unity-dock/"     class="crp_title">Creating a Shortcut to Eclipse on the Ubuntu Unity Dock</a></li><li><a href="http://davidsalter.com/2010/07/running-jboss-tools-in-eclipse-3-6-helios/"     class="crp_title">Running JBoss Tools in Eclipse 3.6, Helios</a></li><li><a href="http://davidsalter.com/2011/05/apache-tomcat-7-0-14-released/"     class="crp_title">Apache Tomcat 7.0.14 released</a></li><li><a href="http://davidsalter.com/2013/04/developing-java-ee-6-applications-with-tomee-and-netbeans/"     class="crp_title">Developing Java EE 6 Applications With TomEE and NetBeans</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://davidsalter.com/2012/03/choosing-a-java-version-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
