Open Development Platform

Eclipse Platform

Subscribe to Eclipse Platform: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get Eclipse Platform: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


This is the first article in a series focused on developing iControl applications with the Java language.  I’ve picked Eclipse development platform for this set of platforms.  The goal here is to give you the directions and tools you need to make the most out of iControl when you are involved with Java development. 

For this article, I’m going to assume that you are starting off of a clean system.  In most cases, you will already have one or more of the prerequisites installed so you can feel free to ignore that section.  This article was developed with all the components on a Windows 7 System, but everything should work similarly on other platforms.

The Pieces To The Puzzle

Java Java

The first item you will need to install is Java itself.  This can be downloaded from the Java Website At Oracle.com.  There are a lot of different versions of Java but I always stick to the bare bones “Java SE” JDK distribution. 

I’m not going to walk through the installation of Java as I assume you can figure that one out for yourself.  If you are really stuck, do a Google Search for “How To Install Java” and that should point you in the right direction.

eclipse Eclipse

Eclipse is an open source development platform build with extensible frameworks, tools and runtimes for many different languages – Java being one of them.  The JDT (Java Development Tools) project  provides the tool plug-ins that implement a Java IDE supporting the development of any Java application. 

To install Eclipse for Java, visit the downloads page at http://www.eclipse.org/downloads/ and select the appropriate “Eclipse IDE for Java Developers distribution.  Even though I am running 64-bit windows, I had an issue getting the 64-bit build of Eclipse to work.  This was possibly due to the version of Java I had installed.  So, I picked the “Windows 32 Bit” download and it worked out find. 

The download is just a .zip file containing the product directory.  Just unzip this to a location of your choosing.

iControlAssembly iControl Library For Java

At this point you should have a development environment setup for building Java applications.  The last piece of the puzzle is the iControl libraries for Java.  iControl is a set of Web Services and we have taken the Web Service Description Language (WSDL) files, built client proxy code for them, and packaged them within a nice wrapper class and packed them into a Java library to make it as easy as possible for you to integrate iControl into a new or existing Java application.

To get the libraries, you’ll need to visit the iControl Assembly (we have a .Net version as well) Labs project on DevCentral and click on the “Discussions and Downloads” link.  From there Click into the latest release in the “Downloads” section (as of now it is at iControl v10.2) and download the “Java Binary Distribution” release.  The “Java Source Distribution” is available if you want to see how I built the library.

The binary download will include two directories: Lib and 3rdparty.  The client proxy code was built with Apache Axis so we’ve included those libraries to include in your projects as well so that you don’t have to go hunting elsewhere for all the other dependent libraries.  Unzip this directory somewhere on your disk (ie \iControl\javalib).

Building Your First Project

I figured that a video would be easier to follow than me describing the steps it takes to create a project and import the iControl libraries in it so I make this walkthrough where I:

  • Created a new Java project in Eclipse.
  • Imported the iControl Library for Java and associated 3rd party libraries.
  • Created a class with a Main method to be used as a console application.
  • Created an instance of the iControl.Interfaces object.
  • Initialized the iControl.Interfaces object with the credentials for my BIG-IP.
  • Added logic to query the System information and output that to the console.
  • Debug and demonstrate the application.

I did all that in 5 minutes! …with a little help from cut-and-paste B-).

Conclusion

You should now be able to build a Java application to make use of the automation features of your BIG-IP.  In future articles, I will illustrate other aspects of the iControl API with Java.

Download

The Java class for this example can be downloaded from the iControl CodeShare under JavaSystemInfo.

Related Articles on DevCentral

Technorati Tags: iControl, Java, Eclipse, Joe Pruitt

Read the original blog entry...

More Stories By Joe Pruitt

Joe Pruitt is a Principal Strategic Architect at F5 Networks working with Network and Software Architects to allow them to build network intelligence into their applications.