Поделиться через


Improving experience for Java developers with Windows Azure

From the early days, Windows Azure has offered choices to developers. It allows use of multiple languages (like .NET, PHP, Ruby or Java) and development tools (like Visual Studio, Eclipse) to build applications that run on Windows Azure or consume any of the Windows Azure platform services from any other cloud or on-premises platform. Java developers have had a few options to leverage Windows Azure, like the Windows Azure SDK for Java or the Tomcat Solution Accelerator.

At PDC10, we introduced our plan to improve the experience for Java developers with Windows Azure. Today, we’re excited to release a Community Technology Preview (CTP) of the Windows Azure Starter Kit for Java, which enables Java developers to simply configure, package and deploy their web applications to Windows Azure. The goal for this CTP is to get feedback from Java developers, and to nail down the correct experience for Java developers, particularly to make sure that configuring, packaging and deploying to Windows Azure integrates well with common practices.

What’s the Windows Azure Starter Kit for Java?

This Starter Kit was designed to work as a simple command line build tool or in the Eclipse integrated development environment (IDE). It uses Apache Ant as part of the build process, and includes an Ant extension that’s capable of understanding Window Azure configuration options.

The Windows Azure Starter Kit for Java is an open source project released under the Apache 2.0 license, and it is available for download at: http://wastarterkit4java.codeplex.com/

What’s inside the Windows Azure Starter Kit for Java?

The Windows Azure Starter Kit for Java is a Zip file that contains a template project and the Ant extension. If you look inside this archive you will find the typical files that constitute a Java project, as well as several files we built that will help you test, package and deploy your application to Windows Azure.

clip_image002[4]

The main elements of the template are:

  • .cspack.jar: This contains that java implementation of windowsazurepackage ant task.
  • ServiceConfiguration.cscfg: This is the Windows Azure service configuration file.
  • ServiceDefinition.csdef: This is the Windows Azure service definition file.
  • Helloworld.zip: This Zip is a placeholder for your Java application.
  • startup.cmd: This script is run each time your Windows Azure Worker Role starts.

Check the tutorial listed below for more details.

Using the Windows Azure Starter Kit for Java

As mentioned above, you can use the Starter Kit from a simple command line or within Eclipse. In both case the steps are similar:

  1. Download and unzip the Starter Kit
  2. Copy your Java application into the approot folder
  3. Copy the Java Runtime Environment and server distribution (like Tomcat or Jetty) ZIPs into the approot folder
  4. Configure the Startup commands in startup.cmd (specific to the server distribution)
  5. Configure the Windows Azure configuration in ServiceDefinition.cscfg
  6. Run the build and deploy commands

For detailed instructions, refer to the following tutorials, which show how to deploy a Java web application running with Tomcat and Jetty:

What’s next?

Yesterday, Microsoft announced an Introductory Special offer that includes 750 hours per month (which is one server 24x7) of the Windows Azure extra-small instance, plus one small SQL Azure database and other platform capabilities - all free until June 30, 2011.  This is a great opportunity for all developers to see what the cloud can do - without any up-front investment!

 You can also expect continued updates to the development tools and SDK, but the experience of Java developers is critical. Now is the perfect time to provide your feedback, so join us on the forum at: http://wastarterkit4java.codeplex.com/

-- Jean-Christophe Cimetiere, Sr. Technical Evangelist , @openatmicrosoft

Comments

  • Anonymous
    March 01, 2011
    Great, this is a welcome simplification!