Running Java on Windows Azure is perhaps a bit of a strange match? However it is not only possible it is quite easy to do once you get the hang of it. Here are a few experiences from my dealings in this domain.

I have so far delivered two talks on Java in Windows Azure together with my colleague Magnus Mårtensson (@noopman). The first one at TechDays in Sweden and the second one at NDC in Norway. Both of these were .NET conferences. Since I have never attended a .NET event before, it was exciting to notice the small differences to the Java world.

First of all there is the diversity: in the Java world we are used to having an enormous variety of choices in pretty much everything. We have a massive number of Web Frameworks, Persistence Frameworks, Application Servers, Integration Solutions, IDEs, JVMs and so forth. In contrast in the .NET world you have one choice for most things. As a seasoned Java developer my first reaction was that the Java world is better – even if too many choices can be stressful it is still better than no choice.

After attending a couple of .NET sessions and talking to developers I realized that no one was talking about frameworks or servers – they were instead focused on solutions, on how to use the available technology to solve a specific problem. I find this quite relieving. I mean, the purpose of technology is to solve problems and the notion of “My framework is better than yours” seems absent in the .NET world. You still have some of “.NET is better than Java” and vice versa, but that is just sibling rivalry. When I talk to Java developers about running Java in Windows Azure I often get the question “Why?”. My answer to that is that it runs the JVM – no better or worse than any of the other clouds, it is just a different choice. Besides it is critical to be able to run enterprise applications in any Cloud consisting of many different technologies, platforms and stacks.

When choosing a Cloud to host your Java solutions there are a lot of parameters to consider: Pricing, available services, performance, CDN availability, stability, licensing, tooling and so on. Windows Azure will not be the right choice for everything in this respect. If you have an environment where you have a mix of both Java and .NET, which according to my experience most of the larger corporations have, then windows Azure is probably something you should consider. On the flip side, if you are a .NET developer and ask the question “Why would I want Java in Windows Azure?” the answer is that you would get access to a lot of new shiny toys. This is the case for Magnus who is putting the awesome graph database Neo4j into Windows Azure.

Since Neo4j has a RESTful API, calling it from .NET applications works just fine. There is a fair amount of work to be done to make a Java application behave well in Azure. You have to take care of storage, logging, scaling and such. In comparison to actually making a Neo4j port to .NET, this is a walk in the park. Another example is Drools, the Java rule engine by JBoss. A Drools.NET exists, but it has always lagged behind and now seems to have been abandoned. A Windows Azure deployment would make the latest version available instantly, thanks to the Windows Azure Java support. The Java tooling support for Windows Azure in the form of a development environment (IDE) is still in an early stage. Still it is already a lot easier to deploy java applications to Windows Azure than it used to be. Live in our session at NDC I was able to develop, deploy and run a Java Web Application in Windows Azure so my guess would be that it wouldn’t take more than a day or so for a Java developer to get up and running.