Download Getting Started With iControl And Java – Setting Up Eclipse

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Getting Started With iControl And Java – Setting Up
Eclipse
Joe Pruitt, 2010-15-09
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
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 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 64bit 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.
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).
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
More caffeine please...
Simple Ways to Make iControl Development Easier with Java Tools ...
iControl Tech Tips Archive
Java assembly version - DevCentral - F5 DevCentral > Community ...
iControl Quickstart for Java > DevCentral > F5 DevCentral > Tech Tips
Updating domain info using iControl - DevCentral - F5 DevCentral ...
Technorati Tags: iControl, Java, Eclipse, Joe Pruitt
F5 Networks, Inc. | 401 Elliot Avenue West, Seattle, WA 98119 | 888-882-4447 | f5.com
F5 Networks, Inc.
Corporate Headquarters
[email protected]
F5 Networks
Asia-Pacific
[email protected]
F5 Networks Ltd.
Europe/Middle-East/Africa
[email protected]
F5 Networks
Japan K.K.
[email protected]
©2016 F5 Networks, Inc. All rights reserved. F5, F5 Networks, and the F5 logo are trademarks of F5 Networks, Inc. in the U.S. and in certain other countries. Other F5
trademarks are identified at f5.com. Any other products, services, or company names referenced herein may be trademarks of their respective owners with no
endorsement or affiliation, express or implied, claimed by F5. CS04-00015 0113